(connection: ForkSafeConnection, statement: str)
| 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) |