(lock_type: type[BaseFileLock], tmp_path: Path)
| 576 | |
| 577 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |
| 578 | def test_context_decorator(lock_type: type[BaseFileLock], tmp_path: Path) -> None: |
| 579 | lock_path = tmp_path / "a" |
| 580 | lock = lock_type(str(lock_path)) |
| 581 | |
| 582 | @lock |
| 583 | def decorated_method() -> None: |
| 584 | assert lock.is_locked |
| 585 | |
| 586 | assert not lock.is_locked |
| 587 | decorated_method() |
| 588 | assert not lock.is_locked |
| 589 | |
| 590 | |
| 591 | def test_lock_mode(tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected