MCPcopy Create free account
hub / github.com/tox-dev/filelock / lose_commit

Function lose_commit

tests/soft/read_write/test_participant.py:76–80  ·  view source on GitHub ↗
(_log: GenerationLog, successor: Snapshot)

Source from the content-addressed store, hash-verified

74 lost = []
75
76 def lose_commit(_log: GenerationLog, successor: Snapshot) -> bool:
77 nonlocal now
78 lost.append(successor)
79 now += 1
80 return False
81
82 mocker.patch.object(GenerationLog, "commit", autospec=True, side_effect=lose_commit)
83 with pytest.raises(SoftFileLockProtocolError, match="could not withdraw holder") as caught:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected