From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 8 Apr 2024 06:35:48 +0000 (+0300) Subject: gh-111726: Cleanup test files after running sqlite3 doctest (#117604) X-Git-Tag: v3.13.0a6~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a453f5ef9d0b89bd00488d3814c6f0a2886342b8;p=thirdparty%2FPython%2Fcpython.git gh-111726: Cleanup test files after running sqlite3 doctest (#117604) Remove all temporary databases in a dedicated 'testcleanup' step at the end of the file. --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index e76dc91bf2d8..b17ac19535df 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -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")