Skip to content

Commit

Permalink
Extensive change tracker implementation tests. #323
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon24 committed Mar 1, 2024
1 parent e72109c commit 94364ba
Show file tree
Hide file tree
Showing 2 changed files with 360 additions and 74 deletions.
3 changes: 2 additions & 1 deletion src/reader/_storage/_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def get(

@wrap_exceptions(ENABLED_EXC)
def done(self, changes: list[Change]) -> None:
# FIXME: len(changes) <= self.storage.chunk_size
if len(changes) > self.storage.chunk_size:
raise ValueError(f"too many changes, expected <= {self.storage.chunk_size}")
with self.storage.get_db() as db:
for change in changes:
db.execute(
Expand Down
Loading

0 comments on commit 94364ba

Please sign in to comment.