From e9a49c273e54e5efcb577ccb93d061de6d920e28 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:42:42 +0200 Subject: [PATCH] [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 a453f5ef9d0b89bd00488d3814c6f0a2886342b8) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- Doc/library/sqlite3.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 4c71e5202f7..541eb95094f 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -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")