Skip to content

Commit bb6167c

Browse files
committed
Merge branch 'master' into relax-config-type
2 parents c0ca686 + 087e0b6 commit bb6167c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ Changelog
261261
- Fixes a bug that prevents async Hypothesis tests from working without explicit ``asyncio`` marker when ``--asyncio-mode=auto`` is set. `#258 <https://github.com/pytest-dev/pytest-asyncio/issues/258>`_
262262
- Fixed a bug that closes the default event loop if the loop doesn't exist `#257 <https://github.com/pytest-dev/pytest-asyncio/issues/257>`_
263263
- Added type annotations. `#198 <https://github.com/pytest-dev/pytest-asyncio/issues/198>`_
264+
- Show asyncio mode in pytest report headers. `#266 <https://github.com/pytest-dev/pytest-asyncio/issues/266>`_
264265
- Relax ``asyncio_mode`` type definition; it allows to support pytest 6.1+. `#262 <https://github.com/pytest-dev/pytest-asyncio/issues/262>`_
265266

266267
0.17.0 (22-01-13)

pytest_asyncio/plugin.py

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

188188

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

0 commit comments

Comments
 (0)