aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sqlite3/test_backup.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-08-23 12:10:08 +0200
committerGitHub <noreply@github.com>2023-08-23 10:10:08 +0000
commit29bc6165ab8aa434145a34676b8b7e48e7c6e308 (patch)
tree3cea1120da428a47a2039140a15855adc3bc01cb /Lib/test/test_sqlite3/test_backup.py
parent31b61d19abcc63aa28625a31ed75411948fc1e7e (diff)
downloadcpython-29bc6165ab8aa434145a34676b8b7e48e7c6e308.tar.gz
cpython-29bc6165ab8aa434145a34676b8b7e48e7c6e308.zip
gh-105539: Fix ResourceWarning from unclosed SQLite connections in test_sqlite3 (#108360)
Follow up to 1a1bfc28912a39b500c578e9f10a8a222638d411. Explicitly manage connections in: - test_audit.test_sqlite3 - test_sqlite3.test_audit - test_sqlite3.test_backup Co-authored-by: Erlend E. Aasland <erlend@python.org>
Diffstat (limited to 'Lib/test/test_sqlite3/test_backup.py')
-rw-r--r--Lib/test/test_sqlite3/test_backup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_sqlite3/test_backup.py b/Lib/test/test_sqlite3/test_backup.py
index 4584d976bce..c7400d8b216 100644
--- a/Lib/test/test_sqlite3/test_backup.py
+++ b/Lib/test/test_sqlite3/test_backup.py
@@ -137,7 +137,7 @@ class BackupTests(unittest.TestCase):
raise SystemError('nearly out of space')
with self.assertRaises(SystemError) as err:
- with sqlite.connect(':memory:') as bck:
+ with memory_database() as bck:
self.cx.backup(bck, progress=progress)
self.assertEqual(str(err.exception), 'nearly out of space')