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

Function test_sequential_mode_switch

tests/sqlite/test_transactions.py:199–204  ·  view source on GitHub ↗
(lock_file: str, first: str, second: str)

Source from the content-addressed store, hash-verified

197 ],
198)
199def test_sequential_mode_switch(lock_file: str, first: str, second: str) -> None:
200 lock = ReadWriteLock(lock_file, is_singleton=False)
201 with getattr(lock, f"{first}_lock")():
202 assert not writer_gets_in(lock_file)
203 with getattr(lock, f"{second}_lock")():
204 assert not writer_gets_in(lock_file)
205
206
207def test_non_blocking_read_fails_when_write_held(lock_file: str) -> None:

Callers

nothing calls this directly

Calls 2

ReadWriteLockClass · 0.90
writer_gets_inFunction · 0.90

Tested by

no test coverage detected