Message112724
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. |
|
Date |
User |
Action |
Args |
2010-08-03 23:53:48 | terry.reedy | set | recipients:
+ terry.reedy, tim.peters, ogrisel, bjoti, akaihola, rbp, luciano, christoph, eric.araujo, babilen |
2010-08-03 23:53:48 | terry.reedy | set | messageid: <1280879628.34.0.91189816104.issue1293741@psf.upfronthosting.co.za> |
2010-08-03 23:53:47 | terry.reedy | link | issue1293741 messages |
2010-08-03 23:53:46 | terry.reedy | create | |
|