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

Function _clear_singleton_cache

tests/test_async_read_write.py:22–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21@pytest.fixture(autouse=True)
22def _clear_singleton_cache() -> Generator[None]:
23 ReadWriteLock._instances.clear()
24 yield
25 for ref in list(ReadWriteLock._instances.valuerefs()):
26 if (lock := ref()) is not None:
27 lock.close()
28 ReadWriteLock._instances.clear()
29
30
31@pytest.fixture

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…