[New-bugs-announce] [issue10123] test_doctest failure with ASCII filesystem encoding

STINNER Victor report at bugs.python.org
Sat Oct 16 16:15:54 CEST 2010


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

In #10114, I changed parser filename encoding from utf-8/strict to the filesystem encoding/surrogateescape. With C locale, the filesystem encoding is ASCII and test_doctest fails because it uses an unencoable filename (foo-bär at baz.py).

A solution is to write a test specific to non-ascii filenames and skip it if the filename is not encodable (try if os.fsencode() raises an UnicodeEncodeError or not), and use only ascii filenames in the other tests.

----------
components: Tests, Unicode
messages: 118870
nosy: haypo
priority: normal
severity: normal
status: open
title: test_doctest failure with ASCII filesystem encoding
versions: Python 3.2

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


More information about the New-bugs-announce mailing list