[3.12] gh-111726: Cleanup test files after running sqlite3 doctest (GH-117604) (#117622)

Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.
(cherry picked from commit a453f5ef9d)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-04-08 08:42:42 +02:00 committed by GitHub
parent 2449441242
commit e9a49c273e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2707,3 +2707,11 @@ regardless of the value of :attr:`~Connection.isolation_level`.
.. _SQLite transaction behaviour: .. _SQLite transaction behaviour:
https://www.sqlite.org/lang_transaction.html#deferred_immediate_and_exclusive_transactions 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")