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

Function test_lock_uses_instance_defaults

tests/sqlite/test_transactions.py:131–134  ·  view source on GitHub ↗
(lock_file: str, mode: Literal["read", "write"])

Source from the content-addressed store, hash-verified

129 ],
130)
131def test_lock_uses_instance_defaults(lock_file: str, mode: Literal["read", "write"]) -> None:
132 lock = ReadWriteLock(lock_file, timeout=3.0, blocking=True, is_singleton=False)
133 with getattr(lock, f"{mode}_lock")():
134 assert lock._hold.mode == mode
135
136
137def test_read_lock_custom_timeout(lock_file: str) -> None:

Callers

nothing calls this directly

Calls 1

ReadWriteLockClass · 0.90

Tested by

no test coverage detected