(
lock_file: str,
first: Literal["read", "write"],
second: Literal["read", "write"],
)
| 265 | ) |
| 266 | @pytest.mark.timeout(15) |
| 267 | def test_sequential_lock_modes( |
| 268 | lock_file: str, |
| 269 | first: Literal["read", "write"], |
| 270 | second: Literal["read", "write"], |
| 271 | ) -> None: |
| 272 | lock = ReadWriteLock(lock_file) |
| 273 | for mode in (first, second): |
| 274 | with getattr(lock, f"{mode}_lock")(): |
| 275 | assert not writer_gets_in(lock_file) |
| 276 | assert writer_gets_in(lock_file) |
| 277 | |
| 278 | |
| 279 | def test_read_write_lock_keeps_constructed_database(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: |
nothing calls this directly
no test coverage detected