MCPcopy Create free account
hub / github.com/tox-dev/filelock / test_wrong_platform

Function test_wrong_platform

tests/test_filelock.py:587–598  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

585
586
587def 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")

Callers

nothing calls this directly

Calls 2

acquireMethod · 0.45
_releaseMethod · 0.45

Tested by

no test coverage detected