Title: Doctest does not work against unicode strings
Type: Severity: normal
Components: Core Versions: 2.5alpha1
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.

msg3302 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008-06-23.18:30:20
This causes 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
<> and
a minimal failing test is:

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

[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'")

We get:

>>> eval(u"'b\u0105r'")
msg3757 (view) Author: Philip Jenvey (pjenvey) Date: 2008-11-07.23:19:53
fixed in r5551
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