Skip to content

Commit f6b5295

Browse files
committed
Shadow the per-module runner lease in the docs subscriptions tests
The module parametrizes anyio_backend for its trio legs, which the module-scoped lease cannot depend on (ScopeMismatch at setup); the lease's own docstring prescribes this sync no-op shadow.
1 parent b642ac4 commit f6b5295

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/docs_src/test_subscriptions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
pytestmark = [pytest.mark.anyio, pytest.mark.filterwarnings("error::mcp.MCPDeprecationWarning")]
3131

3232

33+
@pytest.fixture(autouse=True)
34+
def _module_runner_lease() -> None:
35+
"""Opt out of the shared per-module event loop: this module parametrizes `anyio_backend`."""
36+
37+
3338
class _Stream:
3439
"""Collects listen-stream notifications and lets tests await arrival counts."""
3540

0 commit comments

Comments
 (0)