(self, pytester: Pytester)
| 900 | reprec.assertoutcome(passed=1) |
| 901 | |
| 902 | def test_doctest_id(self, pytester: Pytester) -> None: |
| 903 | pytester.makefile( |
| 904 | ".txt", |
| 905 | """ |
| 906 | >>> x=3 |
| 907 | >>> x |
| 908 | 4 |
| 909 | """, |
| 910 | ) |
| 911 | testid = "test_doctest_id.txt::test_doctest_id.txt" |
| 912 | expected_lines = [ |
| 913 | "*= FAILURES =*", |
| 914 | "*_ ?doctest? test_doctest_id.txt _*", |
| 915 | "FAILED test_doctest_id.txt::test_doctest_id.txt", |
| 916 | "*= 1 failed in*", |
| 917 | ] |
| 918 | result = pytester.runpytest(testid, "-rf", "--tb=short") |
| 919 | result.stdout.fnmatch_lines(expected_lines) |
| 920 | |
| 921 | # Ensure that re-running it will still handle it as |
| 922 | # doctest.DocTestFailure, which was not the case before when |
| 923 | # re-importing doctest, but not creating a new RUNNER_CLASS. |
| 924 | result = pytester.runpytest(testid, "-rf", "--tb=short") |
| 925 | result.stdout.fnmatch_lines(expected_lines) |
| 926 | |
| 927 | def test_core_backward_compatibility(self) -> None: |
| 928 | """Test backward compatibility for get_plugin_manager function. See #787.""" |
nothing calls this directly
no test coverage detected