Skip to content

Commit 1bf5bf8

Browse files
committed
Show asyncio mode in pytest report headers
1 parent 308f308 commit 1bf5bf8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pytest_asyncio/plugin.py

+7
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ def pytest_configure(config: Config) -> None:
187187
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
188188

189189

190+
@pytest.mark.tryfirst
191+
def pytest_report_header(config: Config) -> List[str]:
192+
"""Add asyncio config to pytest header."""
193+
mode = _get_asyncio_mode(config)
194+
return [f"asyncio: mode={mode}"]
195+
196+
190197
@pytest.mark.tryfirst
191198
def pytest_pycollect_makeitem(
192199
collector: Union[pytest.Module, pytest.Class], name: str, obj: object

0 commit comments

Comments
 (0)