cpython/Lib/test/test_doctest
Denis Laxalde fece15d29f
gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930)
Previously, DocTest's lineno of functions and methods decorated with
functools.cache(), functools.lru_cache() and functools.cached_property()
was not properly returned (None was returned) because the
computation relied on inspect.isfunction() which does not consider the
decorated result as a function.

We now use the more generic inspect.isroutine(), as elsewhere
in doctest's logic.

Also, added a special case for functools.cached_property().
2025-07-25 12:46:12 +03:00
..
__init__.py
decorator_mod.py
doctest_aliases.py
doctest_lineno.py gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930) 2025-07-25 12:46:12 +03:00
sample_doctest.py
sample_doctest_errors.py gh-108885: Imporove tests for doctest (GH-134832) 2025-05-28 20:14:56 +03:00
sample_doctest_no_docstrings.py
sample_doctest_no_doctests.py
sample_doctest_skip.py gh-117294: Report DocTestCase as skipped if all examples in the doctest are skipped (GH-117297) 2024-03-28 21:59:12 +02:00
test_doctest.py gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930) 2025-07-25 12:46:12 +03:00
test_doctest.txt
test_doctest2.py
test_doctest2.txt
test_doctest3.txt
test_doctest4.txt
test_doctest_errors.txt gh-108885: Imporove tests for doctest (GH-134832) 2025-05-28 20:14:56 +03:00
test_doctest_skip.txt gh-108885: Imporove tests for doctest (GH-134832) 2025-05-28 20:14:56 +03:00
test_doctest_skip2.txt gh-108885: Imporove tests for doctest (GH-134832) 2025-05-28 20:14:56 +03:00