@@ -24,7 +24,7 @@ def test_pytest_marker(executed_docstring_source):
24
24
)
25
25
26
26
27
- def test_omit_pytest_markers (executed_docstring_source ):
27
+ def test_show_reserved_pytest_markers_full_decorator (executed_docstring_source ):
28
28
"""
29
29
>>> import pytest
30
30
@@ -33,17 +33,33 @@ def test_omit_pytest_markers(executed_docstring_source):
33
33
... @pytest.mark.parametrize("param", ["foo"])
34
34
... @pytest.mark.skipif(False, reason="reason2")
35
35
... @pytest.mark.skipif(False, reason="reason1")
36
- ... def test_omit_pytest_markers_example (param):
36
+ ... def test_show_reserved_pytest_markers_full_decorator_example (param):
37
37
... pass
38
38
"""
39
39
40
40
assert_that (executed_docstring_source .allure_report ,
41
- has_test_case ('test_omit_pytest_markers_example [foo]' ,
41
+ has_test_case ('test_show_reserved_pytest_markers_full_decorator_example [foo]' ,
42
42
has_tag ("usermark1" ),
43
43
has_tag ("usermark2" ),
44
- not_ (has_tag ("skipif(False, reason='reason2')" )),
45
- not_ (has_tag ("skipif(False, reason='reason1')" )),
46
- not_ (has_tag ("parametrize('param', ['foo'])" ))
44
+ has_tag ("@pytest.mark.skipif(False, reason='reason1')" ),
45
+ not_ (has_tag ("@pytest.mark.skipif(False, reason='reason2')" )),
46
+ not_ (has_tag ("@pytest.mark.parametrize('param', ['foo'])" ))
47
+ )
48
+ )
49
+
50
+
51
+ def test_pytest_xfail_marker (executed_docstring_source ):
52
+ """
53
+ >>> import pytest
54
+
55
+ >>> @pytest.mark.xfail(reason='this is unexpect pass')
56
+ ... def test_pytest_xfail_marker_example():
57
+ ... pass
58
+ """
59
+
60
+ assert_that (executed_docstring_source .allure_report ,
61
+ has_test_case ('test_pytest_xfail_marker_example' ,
62
+ has_tag ("@pytest.mark.xfail(reason='this is unexpect pass')" ),
47
63
)
48
64
)
49
65
0 commit comments