From 91bea609281b658798707bbd577083542718328a Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 5 Aug 2025 20:14:42 -0400 Subject: [PATCH] Limit anyio tests to installed backends --- src/tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/conftest.py b/src/tests/conftest.py index 4aa4e0d..6b02f9a 100644 --- a/src/tests/conftest.py +++ b/src/tests/conftest.py @@ -1,7 +1,15 @@ +import importlib.util import logging import pytest +@pytest.fixture( + params=["asyncio"] + (["trio"] if importlib.util.find_spec("trio") else []) +) +def anyio_backend(request): + return request.param + + @pytest.fixture(autouse=True) def mute_logging(): logging.getLogger().setLevel(logging.WARNING)