[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

R. David Murray report at bugs.python.org
Mon Aug 17 03:12:36 CEST 2015


R. David Murray added the comment:

Unfortunately I was reminded a few days ago that there is a commit hook that prevents patches containing trailing whitespace from being committed to the repository.  So using doctest to test this isn't going to work.

The alternatives are to write a unit test, or to figure out how to write the doctest such there is no trailing whitespace...which would mean capturing the output of doctest.DoctTestRunner instead of letting it go the console, and then comparing it to an explicitly embedded string.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24746>
_______________________________________


More information about the Python-bugs-list mailing list