@@ -19,29 +19,31 @@ def test_xfail(executed_docstring_source):
1919 assert_that (executed_docstring_source .allure_report ,
2020 has_test_case ("test_xfail_example" ,
2121 with_status ("skipped" ),
22- has_status_details (with_message_contains ("AssertionError" ),
22+ has_status_details (with_message_contains ("XFAIL" ),
23+ with_message_contains ("AssertionError" ),
2324 with_trace_contains ("def test_xfail_example():" )
2425 )
2526 )
2627 )
2728
2829
29- def test_xfail_raise_mentioned_exception (executed_docstring_source ):
30+ def test_xfail_with_reason_raise_mentioned_exception (executed_docstring_source ):
3031 """
3132 >>> import pytest
3233
33- >>> @pytest.mark.xfail(raises=AssertionError)
34- ... def test_xfail_raise_mentioned_exception_example ():
34+ >>> @pytest.mark.xfail(raises=AssertionError, reason='Some reason' )
35+ ... def test_xfail_with_reason_raise_mentioned_exception_example ():
3536 ... assert False
3637
3738 """
3839
3940 assert_that (executed_docstring_source .allure_report ,
40- has_test_case ("test_xfail_raise_mentioned_exception_example " ,
41+ has_test_case ("test_xfail_with_reason_raise_mentioned_exception_example " ,
4142 with_status ("skipped" ),
42- has_status_details (with_message_contains ("AssertionError" ),
43+ has_status_details (with_message_contains ("XFAIL Some reason" ),
44+ with_message_contains ("AssertionError" ),
4345 with_trace_contains (
44- "def test_xfail_raise_mentioned_exception_example ():" )
46+ "def test_xfail_with_reason_raise_mentioned_exception_example ():" )
4547 )
4648 )
4749 )
0 commit comments