nose-devs/nose — Issue #351: doctests containing unicode strings have wrong encoding
Author: jpellerin
Created: 2011-12-14 16:08:50+00:00
State: open

Reproduce
---------

Seems like nose has some encoding issues:

$ cat unicode_bug.py
# -*- coding: UTF-8 -*-

def unicode_bug():
"""Demonstrate the bug.

>>> u'缺陷'
u'\u7f3a\u9677'
"""
pass
$ nosetests --with-doctest
[snip]
----------------------------------------------------------------------
File ".../unicode_bug.py", line 6, in unicode_bug.unicode_bug
Failed example:
u'缺陷'
Expected:
u'\u7f3a\u9677'
Got:
u'\xe7\xbc\xba\xe9\x99\xb7'
[snip]
$ nosetests -V
nosetests version 0.11.1

Google Code Info:
Issue #: 299
Author: babi...@gmail.com
Created On: 2009-10-20T19:05:24.000Z
Closed On: