mirror of
https://github.com/simonw/datasette.git
synced 2026-06-06 09:07:00 +02:00
From 409 warnings down to 52 warnings.
By closing unclosed database connections. Refs #2614
This commit is contained in:
parent
9c164572d3
commit
f02484c3de
14 changed files with 75 additions and 27 deletions
|
|
@ -422,9 +422,9 @@ def test_plugins_async_template_function(restore_working_directory):
|
|||
.select("pre.extra_from_awaitable_function")[0]
|
||||
.text
|
||||
)
|
||||
expected = (
|
||||
sqlite3.connect(":memory:").execute("select sqlite_version()").fetchone()[0]
|
||||
)
|
||||
conn = sqlite3.connect(":memory:")
|
||||
expected = conn.execute("select sqlite_version()").fetchone()[0]
|
||||
conn.close()
|
||||
assert expected == extra_from_awaitable_function
|
||||
|
||||
|
||||
|
|
@ -466,6 +466,7 @@ def view_names_client(tmp_path_factory):
|
|||
db_path = str(tmpdir / "fixtures.db")
|
||||
conn = sqlite3.connect(db_path)
|
||||
conn.executescript(TABLES)
|
||||
conn.close()
|
||||
return _TestClient(
|
||||
Datasette([db_path], template_dir=str(templates), plugins_dir=str(plugins))
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue