(lock_file: str)
| 265 | |
| 266 | |
| 267 | def test_nested_read_context_managers(lock_file: str) -> None: |
| 268 | lock = ReadWriteLock(lock_file, is_singleton=False) |
| 269 | with lock.read_lock(): |
| 270 | assert lock._hold.level == 1 |
| 271 | with lock.read_lock(): |
| 272 | assert lock._hold.level == 2 |
| 273 | with lock.read_lock(): |
| 274 | assert lock._hold.level == 3 |
| 275 | assert lock._hold.level == 2 |
| 276 | assert lock._hold.level == 1 |
| 277 | assert lock._hold.level == 0 |
| 278 | |
| 279 | |
| 280 | def test_nested_write_context_managers(lock_file: str) -> None: |
nothing calls this directly
no test coverage detected