We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fa36f2 commit a26b6ddCopy full SHA for a26b6dd
tests/test_simple.py
@@ -45,6 +45,24 @@ async def test_asyncio_marker_fail():
45
result.assert_outcomes(xfailed=1)
46
47
48
+def test_asyncio_auto_mode_compatibility_with_xfail(pytester: Pytester):
49
+ pytester.makepyfile(
50
+ dedent(
51
+ """\
52
+ import pytest
53
+
54
+ pytest_plugins = "pytest_asyncio"
55
56
+ @pytest.mark.xfail(reason="need a failure", strict=True)
57
+ async def test_asyncio_marker_fail():
58
+ raise AssertionError
59
+ """
60
+ )
61
62
+ result = pytester.runpytest("--asyncio-mode=auto")
63
+ result.assert_outcomes(xfailed=1)
64
65
66
@pytest.mark.asyncio
67
async def test_asyncio_marker_with_default_param(a_param=None):
68
"""Test the asyncio pytest marker."""
0 commit comments