From ede942a32e65191ccf554d481987f2d42f4a9a92 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 16 Apr 2026 20:34:48 -0700 Subject: [PATCH] Fix ruff lints in close-related tests Drop unused `bad = ...` assignment and unused `import pytest`. Refs #2692 Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test_internals_datasette.py | 2 +- tests/test_pytest_autoclose_plugin.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_internals_datasette.py b/tests/test_internals_datasette.py index 11463eda..d58c9a29 100644 --- a/tests/test_internals_datasette.py +++ b/tests/test_internals_datasette.py @@ -289,7 +289,7 @@ async def test_datasette_close_continues_past_db_error(): def close(self): raise RuntimeError("boom") - bad = ds.add_database(Boom(ds, is_memory=True), name="bad") + ds.add_database(Boom(ds, is_memory=True), name="bad") good = ds.add_database(Database(ds, is_memory=True), name="good") with pytest.raises(RuntimeError, match="boom"): ds.close() diff --git a/tests/test_pytest_autoclose_plugin.py b/tests/test_pytest_autoclose_plugin.py index 78154ef5..3af1aace 100644 --- a/tests/test_pytest_autoclose_plugin.py +++ b/tests/test_pytest_autoclose_plugin.py @@ -11,8 +11,6 @@ import sys import textwrap from pathlib import Path -import pytest - REPO_ROOT = Path(__file__).parent.parent