Test that the same process can acquire the same read lock multiple times.
(lock_file: str)
| 396 | |
| 397 | @pytest.mark.timeout(10) |
| 398 | def 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 | |
| 410 | def recursive_write_lock(lock_file: str, success_flag: Synchronized[int]) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…