-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5673cbf
commit 169cc32
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
from typing import Any | ||
|
||
import pytest | ||
|
||
anyio_params = [ | ||
pytest.param(("asyncio", {"use_uvloop": False}), id="asyncio"), | ||
pytest.param( | ||
("trio", {"restrict_keyboard_interrupt_to_checkpoints": True}), id="trio" | ||
), | ||
] | ||
if sys.version_info < (3, 13): | ||
# FIXME: uvloop build error | ||
# see more: https://github.com/MagicStack/uvloop/issues/622 | ||
anyio_params.append( | ||
pytest.param(("asyncio", {"use_uvloop": True}), id="asyncio-uvloop") | ||
) | ||
|
||
@pytest.fixture( | ||
params=[ | ||
pytest.param(("asyncio", {"use_uvloop": False}), id="asyncio"), | ||
pytest.param(("asyncio", {"use_uvloop": True}), id="asyncio-uvloop"), | ||
pytest.param( | ||
("trio", {"restrict_keyboard_interrupt_to_checkpoints": True}), id="trio" | ||
), | ||
], | ||
scope="session", | ||
) | ||
|
||
@pytest.fixture(params=anyio_params, scope="session") | ||
def anyio_backend(request: pytest.FixtureRequest) -> tuple[str, dict[str, Any]]: | ||
return request.param |