Make sure that DoctestItem.reportinfo() returns lineno.
(self, pytester: Pytester)
| 860 | result.stdout.fnmatch_lines(["* 1 passed *"]) |
| 861 | |
| 862 | def test_reportinfo(self, pytester: Pytester): |
| 863 | """Make sure that DoctestItem.reportinfo() returns lineno.""" |
| 864 | p = pytester.makepyfile( |
| 865 | test_reportinfo=""" |
| 866 | def foo(x): |
| 867 | ''' |
| 868 | >>> foo('a') |
| 869 | 'b' |
| 870 | ''' |
| 871 | return 'c' |
| 872 | """ |
| 873 | ) |
| 874 | items, _reprec = pytester.inline_genitems(p, "--doctest-modules") |
| 875 | reportinfo = items[0].reportinfo() |
| 876 | assert reportinfo[1] == 1 |
| 877 | |
| 878 | def test_valid_setup_py(self, pytester: Pytester): |
| 879 | """ |
nothing calls this directly
no test coverage detected