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

Function test_ro_folder

tests/core/test_lock.py:92–95  ·  view source on GitHub ↗
(lock_type: type[BaseFileLock], tmp_path_ro: Path)

Source from the content-addressed store, hash-verified

90@pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock])
91@NEEDS_FILE_PERMISSIONS # pragma: needs file-permissions
92def test_ro_folder(lock_type: type[BaseFileLock], tmp_path_ro: Path) -> None:
93 lock = lock_type(str(tmp_path_ro / "a"))
94 with pytest.raises(PermissionError, match="Permission denied"):
95 lock.acquire()
96
97
98@pytest.fixture

Callers

nothing calls this directly

Calls 2

lock_typeFunction · 0.85
acquireMethod · 0.45

Tested by

no test coverage detected