Terry J. Reedy <tjre...@udel.edu> added the comment:

OP: "The doctest module fails when the expected result
string has non-ascii charcaters even if the # -*-
coding: XXX -*- line is properly set."

I believe the claim in msg70907 of #2811 is correct: the file encoding only 
affects the conversion of *unicode* literals to unicode objects. It does not 
affect the conversion of byte literals to byte string objects. Nor does it 
affect the later interpretation of byte strings by testmod. As msg26299 also 
says, make the doctstring a unicode, not byte string, to have the encoding 
cookie take effect. So the original bug claim is invalid.

That aside, the issue was fixed in 3.0 by making text be unicode.
Seriously, issues like this were part of the motivation for 3.0.

That aside, test modules are not revised in bugfix releases without severe 
reason.

Closing for all these reasons: invalid, out-of-date, fixed; take one's pick.

----------
nosy: +tjreedy
resolution:  -> out of date
status: open -> closed
type:  -> feature request
versions: +Python 2.7 -Python 2.4, Python 2.5, Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1293741>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to