Skip to content

Commit

Permalink
Fixed ResourceWarning from unclosed SQLite connection on Python 3.13+.
Browse files Browse the repository at this point in the history
On SQLite, close() doesn't explicitly close in-memory connections.

Follow up to dd45d52.
  • Loading branch information
felixxm authored Mar 19, 2024
1 parent 0a6ed27 commit 921670c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/backends/sqlite/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_init_command(self):
value = cursor.fetchone()[0]
self.assertEqual(value, 2000)
finally:
connections["default"].close()
connections["default"]._close()


@unittest.skipUnless(connection.vendor == "sqlite", "SQLite tests")
Expand Down Expand Up @@ -321,4 +321,4 @@ def change_transaction_mode(self, transaction_mode):
try:
yield new_connection
finally:
new_connection.close()
new_connection._close()

0 comments on commit 921670c

Please sign in to comment.