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

Function test_init_sets_attributes

tests/sqlite/test_lock_settings.py:134–141  ·  view source on GitHub ↗
(lock_file: str)

Source from the content-addressed store, hash-verified

132
133
134def test_init_sets_attributes(lock_file: str) -> None:
135 lock = ReadWriteLock(lock_file, timeout=5.0, blocking=False, is_singleton=False)
136 assert (lock.lock_file, lock.timeout) == (lock_file, pytest.approx(5.0))
137 assert lock.blocking is False
138 assert lock._hold.level == 0
139 assert lock._hold.mode is None
140 assert lock._hold.write_thread_id is None
141 assert Path(lock_file).is_file()
142
143
144def test_write_lock_context_manager_overrides_defaults(lock_file: str) -> None:

Callers

nothing calls this directly

Calls 1

ReadWriteLockClass · 0.90

Tested by

no test coverage detected