testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #00275
[Bug 672056] Re: UnicodeEncodeError: 'ascii' codec can't encode characters in position 2217-2258: ordinal not in range(128)
Okay, I see that doctest bug, it's filed upstream as
<http://bugs.python.org/issue1293741> and is actually fixed in Python
2.7 despite the grousing there.
However I don't the same behaviour with that kind of test using
testtools, as the exception is trapped when formatting the output and
displayed unhelpfully, but safely, as:
Traceback (most recent call last):
File "C:\Python24\lib\doctest.py", line 2157, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: <unprintable AssertionError object>
So, what version of testtools are you running there?
** Bug watch added: Python Roundup #1293741
http://bugs.python.org/issue1293741
--
UnicodeEncodeError: 'ascii' codec can't encode characters in position 2217-2258: ordinal not in range(128)
https://bugs.launchpad.net/bugs/672056
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.
Status in testtools: New
Bug description:
When using testtools to run unit tests from wikkid wiki (launchpad.net/wikkid), I get the following error:
thomi@neil-desktop:~/code/wikkid/thomi-newfileserver$ python -m testtools.run wikkid.tests.test_suite
Tests running...
======================================================================
FAIL: wikkid.contrib.creole_1_1.creole2html
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/lib/python2.6/dist-packages/testtools/run.py", line 282, in <module>
program = TestProgram(argv=sys.argv, testRunner=runner)
File "/usr/lib/python2.6/dist-packages/testtools/run.py", line 134, in __init__
self.runTests()
File "/usr/lib/python2.6/dist-packages/testtools/run.py", line 274, in runTests
self.result = testRunner.run(self.test)
File "/usr/lib/python2.6/dist-packages/testtools/run.py", line 44, in run
result.stopTestRun()
File "/usr/lib/python2.6/dist-packages/testtools/testresult/real.py", line 259, in stopTestRun
self._show_list('FAIL', self.failures)
File "/usr/lib/python2.6/dist-packages/testtools/testresult/real.py", line 245, in _show_list
self.stream.write(output)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 2217-2258: ordinal not in range(128)
I'm running python 2.6.4.
In case it matters, my LANG environment variable is set to: en_NZ.UTF-8
References