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

Function _clear_singleton_cache

tests/test_read_write_unit.py:32–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31@pytest.fixture(autouse=True)
32def _clear_singleton_cache() -> Generator[None]:
33 ReadWriteLock._instances.clear()
34 yield
35 for instance in list(ReadWriteLock._instances.valuerefs()):
36 if (lock := instance()) is not None:
37 lock.close()
38 ReadWriteLock._instances.clear()
39
40
41@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…