[issue1812] doctest _load_testfile function -- newline handling seems incorrect
Peter Donis
report at bugs.python.org
Thu Jul 22 03:44:37 CEST 2010
Peter Donis <peterdonis at alum.mit.edu> added the comment:
Re my msg110822, I think I have a better solution:
have the test create a temporary txt file with
intentionally mismatched newlines, and use that as
the doctest. That means we can control the exact byte
by byte content of the txt file, without worrying about
how it is stored/transferred, etc. I've attached a
Python 2.7 patch, doctest-fixes4.diff, which implements
this test method (same actual tests as before, just the
setup/cleanup is changed); the test passes on my machine.
The test code in this patch also includes comments
explaining why this approach is taken.
----------
Added file: http://bugs.python.org/file18117/doctest-fixes4.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1812>
_______________________________________
More information about the Python-bugs-list
mailing list