]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-111726: Cleanup test files after running sqlite3 doctest (GH-117604) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 8 Apr 2024 06:42:42 +0000 (08:42 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2024 06:42:42 +0000 (06:42 +0000)
Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.
(cherry picked from commit a453f5ef9d0b89bd00488d3814c6f0a2886342b8)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/library/sqlite3.rst

index 4c71e5202f73fb3a8a6630a101f41a7f87035b94..541eb95094fefac44fa9613521f4981ee9865600 100644 (file)
@@ -2707,3 +2707,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")