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

Function execute_with_delay

tests/sqlite/test_transactions_connection.py:46–50  ·  view source on GitHub ↗
(connection: ForkSafeConnection, statement: str)

Source from the content-addressed store, hash-verified

44 statements: list[str] = []
45
46 def execute_with_delay(connection: ForkSafeConnection, statement: str) -> sqlite3.Cursor:
47 if statement.startswith("PRAGMA busy_timeout="):
48 statements.append(statement)
49 clock.perf_counter.return_value = 0.02
50 return execute(connection, statement)
51
52 mocker.patch.object(ForkSafeConnection, "execute", new=execute_with_delay)
53 mocker.patch.object(threading, "active_count", autospec=True, return_value=1)

Callers

nothing calls this directly

Calls 1

executeFunction · 0.70

Tested by

no test coverage detected