(lock_file: str)
| 278 | |
| 279 | |
| 280 | def test_nested_write_context_managers(lock_file: str) -> None: |
| 281 | lock = ReadWriteLock(lock_file, is_singleton=False) |
| 282 | with lock.write_lock(): |
| 283 | assert lock._hold.level == 1 |
| 284 | with lock.write_lock(): |
| 285 | assert lock._hold.level == 2 |
| 286 | assert lock._hold.level == 1 |
| 287 | assert lock._hold.level == 0 |
| 288 | |
| 289 | |
| 290 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected