File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Changelog
7
7
- Output a proper error message when an invalid ``asyncio_mode `` is selected.
8
8
- Extend warning message about unclosed event loops with additional possible cause.
9
9
`#531 <https://github.com/pytest-dev/pytest-asyncio/issues/531 >`_
10
+ - Previously, some tests reported "skipped" or "xfailed" as a result. Now all tests report a "success" results.
10
11
11
12
0.21.0 (2023-03-19)
12
13
===================
Original file line number Diff line number Diff line change @@ -283,6 +283,23 @@ async def test_no_warning_on_skip():
283
283
result .assert_outcomes (skipped = 1 )
284
284
285
285
286
+ def test_asyncio_auto_mode_compatibility_with_skip (pytester : Pytester ):
287
+ pytester .makepyfile (
288
+ dedent (
289
+ """\
290
+ import pytest
291
+
292
+ pytest_plugins = "pytest_asyncio"
293
+
294
+ async def test_no_warning_on_skip():
295
+ pytest.skip("Test a skip error inside asyncio")
296
+ """
297
+ )
298
+ )
299
+ result = pytester .runpytest ("--asyncio-mode=auto" )
300
+ result .assert_outcomes (skipped = 1 )
301
+
302
+
286
303
def test_async_close_loop (event_loop ):
287
304
event_loop .close ()
288
305
You can’t perform that action at this time.
0 commit comments