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

Function test_context_manager_overrides_defaults

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

Source from the content-addressed store, hash-verified

222
223@pytest.mark.asyncio
224async def test_context_manager_overrides_defaults(lock_file: str) -> None:
225 lock = AsyncReadWriteLock(lock_file, timeout=10.0, blocking=False, is_singleton=False)
226 async with lock.read_lock(timeout=5.0, blocking=True):
227 assert_mode_held(lock_file, "read")
228 async with lock.write_lock(timeout=5.0, blocking=True):
229 assert_mode_held(lock_file, "write")
230 await lock.close()
231
232
233@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