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

Function close_between_checks

tests/sqlite/test_async_singletons.py:127–132  ·  view source on GitHub ↗
(instance: ReadWriteLock)

Source from the content-addressed store, hash-verified

125 closed = False
126
127 def close_between_checks(instance: ReadWriteLock) -> bool:
128 nonlocal closed
129 if not closed:
130 closed = True
131 raise sqlite3.ProgrammingError
132 return real_ended(instance)
133
134 mocker.patch.object(ReadWriteLock, "_transaction_ended", autospec=True, side_effect=close_between_checks)
135

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected