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

Function test_sequential_lock_modes

tests/test_read_write.py:360–369  ·  view source on GitHub ↗
(
    lock_file: str,
    first: Literal["read", "write"],
    second: Literal["read", "write"],
)

Source from the content-addressed store, hash-verified

358)
359@pytest.mark.timeout(15)
360def test_sequential_lock_modes(
361 lock_file: str,
362 first: Literal["read", "write"],
363 second: Literal["read", "write"],
364) -> None:
365 lock = ReadWriteLock(lock_file)
366 for mode in (first, second):
367 acquire = lock.read_lock if mode == "read" else lock.write_lock
368 with acquire():
369 pass
370
371
372@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

ReadWriteLockClass · 0.90
acquireFunction · 0.70

Tested by

no test coverage detected