mirror of
https://github.com/python/cpython.git
synced 2025-09-08 18:01:44 +00:00
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>
This commit is contained in:
parent
8db451ceb1
commit
0e8b3fc718
4 changed files with 73 additions and 100 deletions
|
@ -1854,7 +1854,7 @@ class SqliteOnConflictTests(unittest.TestCase):
|
|||
|
||||
@requires_subprocess()
|
||||
class MultiprocessTests(unittest.TestCase):
|
||||
CONNECTION_TIMEOUT = SHORT_TIMEOUT / 1000. # Defaults to 30 ms
|
||||
CONNECTION_TIMEOUT = 0 # Disable the busy timeout.
|
||||
|
||||
def tearDown(self):
|
||||
unlink(TESTFN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue