| 645 | |
| 646 | |
| 647 | def test_wrong_platform(tmp_path: Path) -> None: |
| 648 | assert not inspect.isabstract(UnixFileLock) |
| 649 | assert not inspect.isabstract(WindowsFileLock) |
| 650 | assert inspect.isabstract(BaseFileLock) |
| 651 | |
| 652 | lock_type = UnixFileLock if sys.platform == "win32" else WindowsFileLock |
| 653 | lock = lock_type(tmp_path / "lockfile") |
| 654 | |
| 655 | with pytest.raises(NotImplementedError): |
| 656 | lock.acquire() |
| 657 | with pytest.raises(NotImplementedError): |
| 658 | lock._release() |
| 659 | |
| 660 | |
| 661 | @pytest.mark.skipif(sys.platform == "win32", reason="flock not run on windows") |