mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-28 04:44:26 +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
|
|
@ -44,6 +44,7 @@ def big_db_to_analyze_path(tmpdir):
|
|||
}
|
||||
)
|
||||
db["stuff"].insert_all(to_insert)
|
||||
db.close()
|
||||
return path
|
||||
|
||||
|
||||
|
|
@ -137,6 +138,7 @@ def db_to_analyze_path(db_to_analyze, tmpdir):
|
|||
db = sqlite3.connect(path)
|
||||
sql = "\n".join(db_to_analyze.iterdump())
|
||||
db.executescript(sql)
|
||||
db.close()
|
||||
return path
|
||||
|
||||
|
||||
|
|
@ -311,6 +313,7 @@ def test_analyze_table_validate_columns(tmpdir, args, expected_error):
|
|||
"age": 5,
|
||||
}
|
||||
)
|
||||
db.close()
|
||||
result = CliRunner().invoke(
|
||||
cli.cli,
|
||||
["analyze-tables", path] + args,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue