(lock_type: type[BaseFileLock], tmp_path: Path)
| 557 | |
| 558 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |
| 559 | def test_context_decorator(lock_type: type[BaseFileLock], tmp_path: Path) -> None: |
| 560 | lock_path = tmp_path / "a" |
| 561 | lock = lock_type(str(lock_path)) |
| 562 | |
| 563 | @lock |
| 564 | def decorated_method() -> None: |
| 565 | assert lock.is_locked |
| 566 | |
| 567 | assert not lock.is_locked |
| 568 | decorated_method() |
| 569 | assert not lock.is_locked |
| 570 | |
| 571 | |
| 572 | def test_lock_mode(tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…