mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed ResourceWarning from unclosed SQLite connection on Python 3.13+.
On SQLite, close() doesn't explicitly close in-memory connections.
Follow up to dd45d5223b.
This commit is contained in:
@@ -137,7 +137,7 @@ class Tests(TestCase):
|
||||
value = cursor.fetchone()[0]
|
||||
self.assertEqual(value, 2000)
|
||||
finally:
|
||||
connections["default"].close()
|
||||
connections["default"]._close()
|
||||
|
||||
|
||||
@unittest.skipUnless(connection.vendor == "sqlite", "SQLite tests")
|
||||
@@ -321,4 +321,4 @@ class TestTransactionMode(SimpleTestCase):
|
||||
try:
|
||||
yield new_connection
|
||||
finally:
|
||||
new_connection.close()
|
||||
new_connection._close()
|
||||
|
||||
Reference in New Issue
Block a user