nose-devs/nose — Issue #12: Captured unicode causes exception
Author: jpellerin
Created: 2011-12-14 15:54:43+00:00
State: closed

If any test code prints a unicode string while running under nosetests with
output capture enabled, you get an exception like:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in
position 1: ordinal not in range(128)

To see this problem, put the following function in a test.py file and run
it with 'nosetests -v test.py:test_unicode':

def test_unicode():
print u'böy'

If output capture is disabled with --nocapture, everything works as expected.

This problem can be worked around by encoding all unicode strings before
printing, but that is a hassle for us since our entire project is unicode
internally.

Google Code Info:
Issue #: 227
Author: schi...@gmail.com
Created On: 2009-01-12T07:12:14.000Z
Closed On: