(self, pytester: Pytester)
| 808 | reprec.assertoutcome(passed=1) |
| 809 | |
| 810 | def test_doctest_id(self, pytester: Pytester) -> None: |
| 811 | pytester.makefile( |
| 812 | ".txt", |
| 813 | """ |
| 814 | >>> x=3 |
| 815 | >>> x |
| 816 | 4 |
| 817 | """, |
| 818 | ) |
| 819 | testid = "test_doctest_id.txt::test_doctest_id.txt" |
| 820 | expected_lines = [ |
| 821 | "*= FAILURES =*", |
| 822 | "*_ ?doctest? test_doctest_id.txt _*", |
| 823 | "FAILED test_doctest_id.txt::test_doctest_id.txt", |
| 824 | "*= 1 failed in*", |
| 825 | ] |
| 826 | result = pytester.runpytest(testid, "-rf", "--tb=short") |
| 827 | result.stdout.fnmatch_lines(expected_lines) |
| 828 | |
| 829 | # Ensure that re-running it will still handle it as |
| 830 | # doctest.DocTestFailure, which was not the case before when |
| 831 | # re-importing doctest, but not creating a new RUNNER_CLASS. |
| 832 | result = pytester.runpytest(testid, "-rf", "--tb=short") |
| 833 | result.stdout.fnmatch_lines(expected_lines) |
| 834 | |
| 835 | def test_core_backward_compatibility(self) -> None: |
| 836 | """Test backward compatibility for get_plugin_manager function. See #787.""" |
nothing calls this directly
no test coverage detected