mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +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:
parent
0a6ed278d8
commit
921670c694
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user