Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/unit/test_note_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@ def test_the_global_cap_binds_exactly_under_concurrent_processes(tmp_path) -> No

on_disk, _ = store._count_notes(root)
assert on_disk == accepted, "every accepted write must be a note that exists"
assert on_disk == cap, f"cap is {cap}, store holds {on_disk}"
counted = store._note_count(root)
assert on_disk == cap, (
f"cap is {cap}, store holds {on_disk}, accepted {accepted}, count file {counted}"
)
# …and the file agrees with the disk, or the next process starts from a wrong number.
assert store._note_count(root) == cap
assert counted == cap


def test_a_refused_write_counts_nothing(tmp_path) -> None:
Expand Down