mirror of
https://github.com/simonw/datasette.git
synced 2026-05-27 12:34:37 +02:00
Declare ds_client as session-scoped so auto-close plugin spares it
ds_client already caches a single Datasette for the whole session via a module-level _ds_client global, so the declared fixture scope should match. With function scope the auto-close plugin correctly closes it after the first test that uses it, which then breaks every subsequent test that reuses the cached (now-closed) instance — as seen in the CI coverage job, which runs serially rather than under pytest-xdist. Refs #2692 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
03eeeb9d92
commit
c9a7dc9be2
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ def bare_ds():
|
|||
return Datasette(memory=True)
|
||||
|
||||
|
||||
@pytest_asyncio.fixture
|
||||
@pytest_asyncio.fixture(scope="session")
|
||||
async def ds_client():
|
||||
from datasette.app import Datasette
|
||||
from datasette.database import Database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue