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

Function test_wrong_platform

tests/native/test_unix_fallback.py:385–395  ·  view source on GitHub ↗
(lock_type: type[BaseFileLock], tmp_path: Path)

Source from the content-addressed store, hash-verified

383 ],
384)
385def test_wrong_platform(lock_type: type[BaseFileLock], tmp_path: Path) -> None:
386 assert not inspect.isabstract(UnixFileLock)
387 assert not inspect.isabstract(WindowsFileLock)
388 assert inspect.isabstract(BaseFileLock)
389
390 lock = lock_type(tmp_path / "lockfile")
391
392 with pytest.raises(NotImplementedError):
393 lock.acquire()
394 with pytest.raises(NotImplementedError):
395 lock._release()
396
397
398@NEEDS_FCNTL # pragma: needs fcntl

Callers

nothing calls this directly

Calls 3

lock_typeFunction · 0.85
acquireMethod · 0.45
_releaseMethod · 0.45

Tested by

no test coverage detected