| 585 | |
| 586 | |
| 587 | def test_wrong_platform(tmp_path: Path) -> None: |
| 588 | assert not inspect.isabstract(UnixFileLock) |
| 589 | assert not inspect.isabstract(WindowsFileLock) |
| 590 | assert inspect.isabstract(BaseFileLock) |
| 591 | |
| 592 | lock_type = UnixFileLock if sys.platform == "win32" else WindowsFileLock |
| 593 | lock = lock_type(tmp_path / "lockfile") |
| 594 | |
| 595 | with pytest.raises(NotImplementedError): |
| 596 | lock.acquire() |
| 597 | with pytest.raises(NotImplementedError): |
| 598 | lock._release() # noqa: SLF001 |
| 599 | |
| 600 | |
| 601 | @pytest.mark.skipif(sys.platform == "win32", reason="flock not run on windows") |