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

Function run

tests/soft/read_write/test_async_executor.py:62–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61def test_async_close_after_default_executor_shutdown(tmp_path: Path) -> None:
62 async def run() -> None:
63 lock = make_async_lock(tmp_path)
64 async with lock.write_lock(timeout=2):
65 pass
66 await asyncio.get_running_loop().shutdown_default_executor()
67 await lock.close()
68
69 with pytest.raises(RuntimeError, match="shutdown"):
70 lock.executor.submit(lambda: None)
71
72 asyncio.run(run())
73

Calls 9

resumeMethod · 0.95
make_async_lockFunction · 0.85
BackendGateClass · 0.85
waitFunction · 0.85
submitMethod · 0.80
waitMethod · 0.80
holdFunction · 0.70
write_lockMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected