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

Function test_recursive_read_lock_acquisition

tests/test_read_write.py:398–407  ·  view source on GitHub ↗

Test that the same process can acquire the same read lock multiple times.

(lock_file: str)

Source from the content-addressed store, hash-verified

396
397@pytest.mark.timeout(10)
398def test_recursive_read_lock_acquisition(lock_file: str) -> None:
399 """Test that the same process can acquire the same read lock multiple times."""
400 success = Value("i", 0)
401 worker = Process(target=recursive_read_lock, args=(lock_file, success))
402
403 with cleanup_processes([worker]):
404 worker.start()
405 worker.join(timeout=5)
406
407 assert success.value == 1, "Recursive read lock acquisition failed"
408
409
410def recursive_write_lock(lock_file: str, success_flag: Synchronized[int]) -> None:

Callers

nothing calls this directly

Calls 2

cleanup_processesFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…