def test_reportinfo(self, pytester: Pytester):
        """Make sure that DoctestItem.reportinfo() returns lineno."""
        p = pytester.makepyfile(
            test_reportinfo="""
            def foo(x):
                '''
                    >>> foo('a')
                    'b'
                '''
                return 'c'
        """
        )
        items, reprec = pytester.inline_genitems(p, "--doctest-modules")
        reportinfo = items[0].reportinfo()
        assert reportinfo[1] == 1
Make sure that DoctestItem.reportinfo() returns lineno.
testing/test_doctest.py