()
| 30 | |
| 31 | |
| 32 | def test_per_key_independence(): |
| 33 | # Path-based keys: changing one call does NOT invalidate an independent |
| 34 | # sibling at a different path (more precise than linear-prefix divergence). |
| 35 | prior = { |
| 36 | (0,): JournalRecord(fingerprint(_spec("a")), "ra"), |
| 37 | (1,): JournalRecord(fingerprint(_spec("b")), "rb"), |
| 38 | (2,): JournalRecord(fingerprint(_spec("c")), "rc"), |
| 39 | } |
| 40 | j = Journal(prior) |
| 41 | assert j.lookup((0,), _spec("a")) == "ra" # hit |
| 42 | assert j.lookup((1,), _spec("CHANGED")) is MISS # changed -> miss |
| 43 | assert j.lookup((2,), _spec("c")) == "rc" # independent -> still hit |
| 44 | |
| 45 | |
| 46 | def test_nested_path_keys_are_distinct(): |
nothing calls this directly
no test coverage detected