Issue1062

classification
Title: Doctest does not work against unicode strings
Type: Severity: normal
Components: Core Versions: 2.5alpha1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, leosoto, pjenvey
Priority: Keywords: test failure causes

Created on 2008-06-23.18:30:20 by fwierzbicki, last changed 2008-11-07.23:19:53 by pjenvey.

Messages
msg3302 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008-06-23.18:30:20
This causes test_doctest2.py from 2.4 and above to fail.
msg3505 (view) Author: Leonardo Soto (leosoto) Date: 2008-09-13.16:27:25
The underlying issue is described on
<http://www.nabble.com/Parsing-and-non-ASCII-Input-td19007415.html> and
a minimal failing test is:

>>> eval(u"'f\xf6\xf6'")
'f\xf6\xf6'
>>> eval(u"'b\u0105r'")
'b?r' 

[You should get back exactly what you feed to eval()]
msg3752 (view) Author: Leonardo Soto (leosoto) Date: 2008-11-05.02:30:52
I was wrong on the last example on the previous test: as \u0105 can't be
encoded on a single byte, it should give back the following:

In [1]: eval(u"'b\u0105r'")
Out[1]: 'b\xc4\x85r'
msg3753 (view) Author: Leonardo Soto (leosoto) Date: 2008-11-05.03:02:24
A required step to fix this issue was committed on r5542. 

Now instead of. 

>>> eval(u"'b\u0105r'")
'b?r' 

We get:

>>> eval(u"'b\u0105r'")
'b\u0105r'
msg3757 (view) Author: Philip Jenvey (pjenvey) Date: 2008-11-07.23:19:53
fixed in r5551
History
Date User Action Args
2008-11-07 23:19:53pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg3757
2008-11-05 03:02:24leosotosetnosy: + pjenvey
messages: + msg3753
2008-11-05 02:30:53leosotosetmessages: + msg3752
2008-09-13 16:27:25leosotosetnosy: + leosoto
messages: + msg3505
2008-06-23 18:30:20fwierzbickicreate