Fix all remaining resource warnings, refs #693

https://gistpreview.github.io/?0bb8e869b82f6ff0db647de755182502
This commit is contained in:
Simon Willison 2025-12-11 16:46:05 -08:00
commit dc9947a5e1
7 changed files with 110 additions and 61 deletions

View file

@ -14,8 +14,11 @@ def test_recreate_ignored_for_in_memory():
def test_recreate_not_allowed_for_connection():
conn = sqlite3.connect(":memory:")
with pytest.raises(AssertionError):
Database(conn, recreate=True)
try:
with pytest.raises(AssertionError):
Database(conn, recreate=True)
finally:
conn.close()
@pytest.mark.parametrize(