[New-bugs-announce] [issue18889] test_sax: multiple failures on Windows desktop

Terry J. Reedy report at bugs.python.org
Sat Aug 31 03:33:31 CEST 2013


New submission from Terry J. Reedy:

These are due to \r in line endings, as with #12037.
  File "F:\Python\dev\py34\lib\test\test_sax.py", line 634, in test_expat_file
    self.assertEqual(result.getvalue(), xml_test_out)

Assert fails because off many \rs in xml_text_out. Same in

line 649, in test_expat_file_nonascii
line 778, in test_expat_inpsource_filename
line 788, in test_expat_inpsource_sysid
line 803, in test_expat_inpsource_sysid_nonascii
line 816, in test_expat_inpsource_stream

A fix that works is essentially the same as for #12037:
  xml_test_out = xml_test_out.replace(b'r', b'')
just after xml_test_out is read from the file.
(.translate(None, b'\r') also works, seems slightly slower)

Another would be to not put \r in the file in the first place;-).

Any objection to this?

----------
files: 188xx_text_sax.diff
keywords: patch
messages: 196606
nosy: christian.heimes, terry.reedy
priority: normal
severity: normal
stage: commit review
status: open
title: test_sax: multiple failures on Windows desktop
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31526/188xx_text_sax.diff

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


More information about the New-bugs-announce mailing list