Skip to content

Commit

Permalink
Merge branch 'master' into relax-config-type
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jan 16, 2022
2 parents c0ca686 + 087e0b6 commit bb6167c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ Changelog
- 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>`_
- 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>`_
- Added type annotations. `#198 <https://github.com/pytest-dev/pytest-asyncio/issues/198>`_
- Show asyncio mode in pytest report headers. `#266 <https://github.com/pytest-dev/pytest-asyncio/issues/266>`_
- Relax ``asyncio_mode`` type definition; it allows to support pytest 6.1+. `#262 <https://github.com/pytest-dev/pytest-asyncio/issues/262>`_

0.17.0 (22-01-13)
Expand Down
7 changes: 7 additions & 0 deletions pytest_asyncio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ def pytest_configure(config: Config) -> None:
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)


@pytest.mark.tryfirst
def pytest_report_header(config: Config) -> List[str]:
"""Add asyncio config to pytest header."""
mode = _get_asyncio_mode(config)
return [f"asyncio: mode={mode}"]


@pytest.mark.tryfirst
def pytest_pycollect_makeitem(
collector: Union[pytest.Module, pytest.Class], name: str, obj: object
Expand Down

0 comments on commit bb6167c

Please sign in to comment.