diff --git a/pyproject.toml b/pyproject.toml index 36cb726..3d065b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,7 @@ ignore_missing_imports = true [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" markers = [ "integration: tests that hit the real Kalshi demo API (require credentials)", "integration_real_api_only: endpoints the demo server cannot service (auth-gated roles, demo-broken). Skipped under the default integration run; enable explicitly with -m integration_real_api_only against a prod-like account.", diff --git a/tests/test_contracts.py b/tests/test_contracts.py index 05b466e..45aca3b 100644 --- a/tests/test_contracts.py +++ b/tests/test_contracts.py @@ -1003,9 +1003,9 @@ class TestWsSpecDrift: # be added here with an evidence citation in the notes field of the # corresponding WS_CONTRACT_MAP entry. _DEMO_DIVERGENCE_ALLOWLIST: ClassVar[set[tuple[str, str]]] = set() + @pytest.fixture(autouse=True, scope="class") @staticmethod - @pytest.fixture(autouse=True, scope="class") def _load(request: pytest.FixtureRequest) -> None: request.cls.spec = _load_asyncapi_spec()