(
self, pytester: Pytester, marker, msg1, msg2
)
| 928 | [("skipif", "SKIP", "skipped"), ("xfail", "XPASS", "xpassed")], |
| 929 | ) |
| 930 | def test_skipif_reporting_multiple( |
| 931 | self, pytester: Pytester, marker, msg1, msg2 |
| 932 | ) -> None: |
| 933 | pytester.makepyfile( |
| 934 | test_foo=""" |
| 935 | import pytest |
| 936 | @pytest.mark.{marker}(False, reason='first_condition') |
| 937 | @pytest.mark.{marker}(True, reason='second_condition') |
| 938 | def test_foobar(): |
| 939 | assert 1 |
| 940 | """.format( |
| 941 | marker=marker |
| 942 | ) |
| 943 | ) |
| 944 | result = pytester.runpytest("-s", "-rsxX") |
| 945 | result.stdout.fnmatch_lines( |
| 946 | [f"*{msg1}*test_foo.py*second_condition*", f"*1 {msg2}*"] |
| 947 | ) |
| 948 | assert result.ret == 0 |
| 949 | |
| 950 | |
| 951 | def test_skip_not_report_default(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected