Make sure that DoctestItem.reportinfo() returns lineno.
(self, pytester: Pytester)
| 779 | result.stdout.fnmatch_lines(["* 1 passed *"]) |
| 780 | |
| 781 | def test_reportinfo(self, pytester: Pytester): |
| 782 | """Make sure that DoctestItem.reportinfo() returns lineno.""" |
| 783 | p = pytester.makepyfile( |
| 784 | test_reportinfo=""" |
| 785 | def foo(x): |
| 786 | ''' |
| 787 | >>> foo('a') |
| 788 | 'b' |
| 789 | ''' |
| 790 | return 'c' |
| 791 | """ |
| 792 | ) |
| 793 | items, reprec = pytester.inline_genitems(p, "--doctest-modules") |
| 794 | reportinfo = items[0].reportinfo() |
| 795 | assert reportinfo[1] == 1 |
| 796 | |
| 797 | def test_valid_setup_py(self, pytester: Pytester): |
| 798 | """ |
nothing calls this directly
no test coverage detected