New submission from R. David Murray: Attached is a patch that enhances doctest discovery so that it can correctly report the line number for doctest errors in tests that are string values of the __test__ dictionary. It only works if the strings are formatted as triple quoted strings, but since that is the most common case I think it is worth doing.
I don't have a test for this...I think it will require a unit test rather than adding to the doctests, since it needs to check the reported line number and other changes to test_doctest.py would change the line numbers. ---------- files: doctest_find__test__.patch keywords: easy, patch messages: 249060 nosy: r.david.murray priority: normal severity: normal stage: test needed status: open title: Allow doctest to find line number of __test__ strings if formatted as a triple quoted string. type: behavior versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file40241/doctest_find__test__.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24925> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com