diff --git a/docs/source/reference/changelog.rst b/docs/source/reference/changelog.rst index 00b73fa0..f68a63c2 100644 --- a/docs/source/reference/changelog.rst +++ b/docs/source/reference/changelog.rst @@ -7,6 +7,7 @@ Changelog - Output a proper error message when an invalid ``asyncio_mode`` is selected. - Extend warning message about unclosed event loops with additional possible cause. `#531 `_ +- Previously, some tests reported "skipped" or "xfailed" as a result. Now all tests report a "success" results. 0.21.0 (2023-03-19) =================== diff --git a/tests/test_simple.py b/tests/test_simple.py index c9853557..facb1cfc 100644 --- a/tests/test_simple.py +++ b/tests/test_simple.py @@ -283,6 +283,23 @@ async def test_no_warning_on_skip(): result.assert_outcomes(skipped=1) +def test_asyncio_auto_mode_compatibility_with_skip(pytester: Pytester): + pytester.makepyfile( + dedent( + """\ + import pytest + + pytest_plugins = "pytest_asyncio" + + async def test_no_warning_on_skip(): + pytest.skip("Test a skip error inside asyncio") + """ + ) + ) + result = pytester.runpytest("--asyncio-mode=auto") + result.assert_outcomes(skipped=1) + + def test_async_close_loop(event_loop): event_loop.close()