Amaury Forgeot d'Arc added the comment:
The problem is probably near this code in Lib/doctest.py (in _load_testfile)::
# get_data() opens files as 'rb', so one must do the equivalent
# conversion as universal newlines would do.
return file_contents.replace(os.linesep, '\
New submission from Feth AREZKI :
At least on Linux debian sid, it seems that Python 2.6.6 compile builtin does
not like the empty line with only '\r\n' in it.
The following doctest story runs with the attached CRLF'ed file:
"""
>>> fd = open('test_win32.py', 'r')
>>> compile(fd.read(), 'test_w