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

Function test_context_manager_uses_instance_defaults

tests/sqlite/test_async.py:214–220  ·  view source on GitHub ↗
(lock_file: str)

Source from the content-addressed store, hash-verified

212
213@pytest.mark.asyncio
214async def test_context_manager_uses_instance_defaults(lock_file: str) -> None:
215 lock = AsyncReadWriteLock(lock_file, timeout=3.0, blocking=True, is_singleton=False)
216 async with lock.read_lock():
217 assert_mode_held(lock_file, "read")
218 async with lock.write_lock():
219 assert_mode_held(lock_file, "write")
220 await lock.close()
221
222
223@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 5

read_lockMethod · 0.95
write_lockMethod · 0.95
AsyncReadWriteLockClass · 0.90
assert_mode_heldFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected