From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 8 Apr 2024 06:42:42 +0000 (+0200) Subject: [3.12] gh-111726: Cleanup test files after running sqlite3 doctest (GH-117604) (... X-Git-Tag: v3.12.3~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9a49c273e54e5efcb577ccb93d061de6d920e28;p=thirdparty%2FPython%2Fcpython.git [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> --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 4c71e5202f73..541eb95094fe 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")