Mailing List Archive

gh-111726: Cleanup test files after running sqlite3 doctest (#117604)
https://github.com/python/cpython/commit/a453f5ef9d0b89bd00488d3814c6f0a2886342b8
commit: a453f5ef9d0b89bd00488d3814c6f0a2886342b8
branch: main
author: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
committer: erlend-aasland <erlend.aasland@protonmail.com>
date: 2024-04-08T08:35:48+02:00
summary:

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.

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index e76dc91bf2d875..b17ac19535df00 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")

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com