]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111726: Cleanup test files after running sqlite3 doctest (#117604)
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Mon, 8 Apr 2024 06:35:48 +0000 (09:35 +0300)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2024 06:35:48 +0000 (08:35 +0200)
Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.

Doc/library/sqlite3.rst

index e76dc91bf2d875ff043cc42d3e990e6e75c75514..b17ac19535df004beeb0de66ca4d4f0153bda6f0 100644 (file)
@@ -2747,3 +2747,11 @@ regardless of the value of :attr:`~Connection.isolation_level`.
 
 .. _SQLite transaction behaviour:
    https://www.sqlite.org/lang_transaction.html#deferred_immediate_and_exclusive_transactions
+
+.. testcleanup::
+
+   import os
+   os.remove("backup.db")
+   os.remove("dump.sql")
+   os.remove("example.db")
+   os.remove("tutorial.db")