[issue18889] test_sax: multiple failures on Windows desktop

Tim Peters report at bugs.python.org
Sun Sep 1 19:15:43 CEST 2013


Tim Peters added the comment:

Suggest caution here.  test_sax fails the same way for me too (Windows Vista), under both the released 3.3.2 and a Python built from the current hg default branch.

However, these files (test.xml and test.xml.out) have not changed since the Python 2.7 line - the \r\n line endings have _always_ been there, and test_sax works fine under (e.g.) Python 2.7.5 on Windows.

So it's not that the files have changed, it must be that Python is behaving differently.

Unfortunately, I don't know anything about what test_sax is trying to do.  I do see that under 2.7, test_sax does

xml_test_out = open(TEST_XMLFILE_OUT).read()

but 3.3 does

with open(TEST_XMLFILE_OUT, 'rb') as f:
    xml_test_out = f.read()

That is, 2.7 opens the file for reading in text mode, but 3.3 opens it in binary mode.  That makes a big difference for text files under Windows.

It's also disturbing that the Windows buildbots don't fail.  There is no change in "environment" that should affect the bytes seen when a file is read - and the buildbots "should be" seeing, byte for byte, the same files developers and users see.

----------
nosy: +tim.peters

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


More information about the Python-bugs-list mailing list