mirror of
https://github.com/django/django.git
synced 2025-03-29 10:40:45 +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 dd45d5223b3c5640baefcb591782bbcff873b6bf.
This commit is contained in:
parent
0a6ed278d8
commit
921670c694
@ -137,7 +137,7 @@ class Tests(TestCase):
|
|||||||
value = cursor.fetchone()[0]
|
value = cursor.fetchone()[0]
|
||||||
self.assertEqual(value, 2000)
|
self.assertEqual(value, 2000)
|
||||||
finally:
|
finally:
|
||||||
connections["default"].close()
|
connections["default"]._close()
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipUnless(connection.vendor == "sqlite", "SQLite tests")
|
@unittest.skipUnless(connection.vendor == "sqlite", "SQLite tests")
|
||||||
@ -321,4 +321,4 @@ class TestTransactionMode(SimpleTestCase):
|
|||||||
try:
|
try:
|
||||||
yield new_connection
|
yield new_connection
|
||||||
finally:
|
finally:
|
||||||
new_connection.close()
|
new_connection._close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user