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

Function collide_intent

tests/test_strict_soft_failures.py:74–81  ·  view source on GitHub ↗
(
        _source: _PathValue,
        _destination: _PathValue,
        **_options: int | bool | None,
    )

Source from the content-addressed store, hash-verified

72 _initialize_protocol(lock_path)
73
74 def collide_intent(
75 _source: _PathValue,
76 _destination: _PathValue,
77 **_options: int | bool | None,
78 ) -> None:
79 # The intent link is the only link this flow attempts before it fails closed, so colliding it unconditionally
80 # is equivalent to matching on the intent- prefix.
81 raise FileExistsError(EEXIST, "claim exists")
82
83 mocker.patch("filelock._strict.os.link", side_effect=collide_intent)
84 lock = StrictSoftFileLock(lock_path, timeout=0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected