(
self, expected, actual, matchline, pytester: Pytester
)
| 596 | ], |
| 597 | ) |
| 598 | def test_xfail_raises( |
| 599 | self, expected, actual, matchline, pytester: Pytester |
| 600 | ) -> None: |
| 601 | p = pytester.makepyfile( |
| 602 | """ |
| 603 | import pytest |
| 604 | @pytest.mark.xfail(raises=%s) |
| 605 | def test_raises(): |
| 606 | raise %s() |
| 607 | """ |
| 608 | % (expected, actual) |
| 609 | ) |
| 610 | result = pytester.runpytest(p) |
| 611 | result.stdout.fnmatch_lines([matchline]) |
| 612 | |
| 613 | def test_strict_sanity(self, pytester: Pytester) -> None: |
| 614 | """Sanity check for xfail(strict=True): a failing test should behave |
nothing calls this directly
no test coverage detected