mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Enhanced the _find_lineno method in doctest to correctly identify and report line numbers for doctests defined in __test__ dictionaries when formatted as triple-quoted strings. Finds a non-blank line in the test string and matches it in the source file, verifying subsequent lines also match to handle duplicate lines. Previously, doctest would report "line None" for __test__ dictionary strings, making it difficult to debug failing tests. Co-authored-by: Jurjen N.E. Bos <jneb@users.sourceforge.net> Co-authored-by: R. David Murray <rdmurray@bitdance.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| decorator_mod.py | ||
| doctest_aliases.py | ||
| doctest_lineno.py | ||
| sample_doctest.py | ||
| sample_doctest_errors.py | ||
| sample_doctest_no_docstrings.py | ||
| sample_doctest_no_doctests.py | ||
| sample_doctest_skip.py | ||
| test_doctest.py | ||
| test_doctest.txt | ||
| test_doctest2.py | ||
| test_doctest2.txt | ||
| test_doctest3.txt | ||
| test_doctest4.txt | ||
| test_doctest_errors.txt | ||
| test_doctest_skip.txt | ||
| test_doctest_skip2.txt | ||