(tmp_path: Path)
| 655 | |
| 656 | |
| 657 | def test_wrong_platform(tmp_path: Path) -> None: |
| 658 | assert not inspect.isabstract(UnixFileLock) |
| 659 | assert not inspect.isabstract(WindowsFileLock) |
| 660 | assert inspect.isabstract(BaseFileLock) |
| 661 | |
| 662 | lock_type = UnixFileLock if sys.platform == "win32" else WindowsFileLock |
| 663 | lock = lock_type(tmp_path / "lockfile") |
| 664 | |
| 665 | with pytest.raises(NotImplementedError): |
| 666 | lock.acquire() |
| 667 | with pytest.raises(NotImplementedError): |
| 668 | lock._release() |
| 669 | |
| 670 | |
| 671 | @NEEDS_FCNTL # pragma: needs fcntl |