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

Function timeout_locks

tests/sqlite/test_transactions_settings.py:206–213  ·  view source on GitHub ↗
(
    tmp_path: Path, lock_type: type[ReadWriteLock | SoftReadWriteLock]
)

Source from the content-addressed store, hash-verified

204
205@pytest.fixture
206def timeout_locks(
207 tmp_path: Path, lock_type: type[ReadWriteLock | SoftReadWriteLock]
208) -> Generator[tuple[ReadWriteLock | SoftReadWriteLock, ReadWriteLock | SoftReadWriteLock]]:
209 with (
210 closing(lock_type(tmp_path / "a", is_singleton=False)) as holder,
211 closing(lock_type(tmp_path / "a", is_singleton=False)) as contender,
212 ):
213 yield holder, contender

Callers

nothing calls this directly

Calls 1

lock_typeFunction · 0.85

Tested by

no test coverage detected