]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-108550: Speed up sqlite3 tests (#108551)
authorErlend E. Aasland <erlend@python.org>
Mon, 28 Aug 2023 12:17:34 +0000 (14:17 +0200)
committerGitHub <noreply@github.com>
Mon, 28 Aug 2023 12:17:34 +0000 (14:17 +0200)
commit0e8b3fc718c8a1c4de558c553d9e05049c1dbec6
tree34e24ddfcc25abbfaa5ff350f15156797cc8d1d0
parent8db451ceb17cf8ec92c8aed2e0a41c78d07f9f45
gh-108550: Speed up sqlite3 tests (#108551)

Refactor the CLI so we can easily invoke it and mock command-line
arguments. Adapt the CLI tests so we no longer have to launch a
separate process.

Disable the busy handler for all concurrency tests; we have full
control over the order of the SQLite C API calls, so we can safely
do this.

The sqlite3 test suite now completes ~8 times faster than before.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/sqlite3/__main__.py
Lib/test/test_sqlite3/test_cli.py
Lib/test/test_sqlite3/test_dbapi.py
Lib/test/test_sqlite3/test_transactions.py