mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-15 04:54:23 +02:00
Claude Code helped fix a ton of .close() warnings, refs #692
https://gistpreview.github.io/?730f0c5dc38528a1dd0615f330bd5481
This commit is contained in:
parent
f77ca0ec0d
commit
81b0599078
6 changed files with 119 additions and 30 deletions
|
|
@ -16,7 +16,9 @@ def pytest_configure(config):
|
|||
|
||||
@pytest.fixture
|
||||
def fresh_db():
|
||||
return Database(memory=True)
|
||||
db = Database(memory=True)
|
||||
yield db
|
||||
db.close()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -30,7 +32,8 @@ def existing_db():
|
|||
INSERT INTO foo (text) values ("three");
|
||||
"""
|
||||
)
|
||||
return database
|
||||
yield database
|
||||
database.close()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -38,4 +41,5 @@ def db_path(tmpdir):
|
|||
path = str(tmpdir / "test.db")
|
||||
db = sqlite3.connect(path)
|
||||
db.executescript(CREATE_TABLES)
|
||||
db.close()
|
||||
return path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue