Skip to content
Myr

Don't check trio import in definition of backend fixture params (#447)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Florimond Manca · committed by Seth Michael Larson · parent a1179e5 · Browse files · 1 file+7 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−11 removed

  • tests:+7 added−11 removed

1 file+7 added−11 removed

modified:tests/conftest.py+7 added-11 removed
16 unmodified lines
17from uvicorn.config import Config18from uvicorn.main import Server1920from httpx import URL, AsyncioBackend21from httpx.concurrency.trio import TrioBackend2223ENVIRONMENT_VARIABLES = {24 "SSL_CERT_FILE",25 "SSL_CERT_DIR",
21 unmodified lines
47 os.environ.clear()48 os.environ.update(original_environ)495050backend_params = [pytest.param(AsyncioBackend, marks=pytest.mark.asyncio)]5152try:53 from httpx.concurrency.trio import TrioBackend54except ImportError: # pragma: no cover55 pass56else:57 backend_params.append(pytest.param(TrioBackend, marks=pytest.mark.trio))585960@pytest.fixture(params=backend_params)51@pytest.fixture(52 params=[53 pytest.param(AsyncioBackend, marks=pytest.mark.asyncio),54 pytest.param(TrioBackend, marks=pytest.mark.trio),55 ]56)57def backend(request):58 backend_cls = request.param59 return backend_cls()60
230 unmodified lines