From d41f06d601a3aeca9250c5a85d600fa1911dfa2a Mon Sep 17 00:00:00 2001 From: "Xin.Zh" Date: Thu, 5 Nov 2026 18:32:42 +0800 Subject: [PATCH] test(sqlite): require a captured shutdown waiter Make the failed-open regression fail when no worker shutdown future is observed, instead of accepting an empty list through all(). Constraint: Preserve the SQLite runtime and supported driver behavior. Scope-risk: Test assertion only; no API, storage or dependency changes. Tested: SQLite profile 47 passed each on Python 3.11, 3.12 and 3.14; missing-capture mutation fails both cases; Linux changed-file hooks and full ty check passed. --- tests/builtin/persistence/test_sqlite_profile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/builtin/persistence/test_sqlite_profile.py b/tests/builtin/persistence/test_sqlite_profile.py index 43992f3fc7..5f41e667dc 100644 --- a/tests/builtin/persistence/test_sqlite_profile.py +++ b/tests/builtin/persistence/test_sqlite_profile.py @@ -92,6 +92,7 @@ async def scenario() -> None: opened = SQLiteProfile.open_readonly(config) if read_only else SQLiteProfile.open(config, tables=()) async with opened: pytest.fail("Unavailable storage must not be opened") + assert stopping, "failed open did not expose a worker shutdown waiter" assert all(future.done() for future in stopping), "open returned before its worker finished stopping" finally: release.set()