When I merge in your patch Robert, I get another failure, this time with the Contains matcher.
======================================================================
ERROR: test_renderHTML_with_unicode_data (test_dbsummaries.TestWebAppErrorSummary)
test_dbsummaries.TestWebAppErrorSummary.test_renderHTML_with_unicode_data
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/home/matsubara/devel/canonical/oops-tools/891186-unicodeencodeerror/src/oopstools/oops/test/test_dbsummaries.py", line 52, in test_renderHTML_with_unicode_data
self.assertThat(fp.read(), Contains(u'some unicode char (\xe1)'))
File "/home/matsubara/devel/canonical/oops-tools/trunk/eggs/testtools-0.9.12-py2.7.egg/testtools/testcase.py", line 400, in assertThat
mismatch = matcher.match(matchee)
File "/home/matsubara/devel/canonical/oops-tools/trunk/eggs/testtools-0.9.12-py2.7.egg/testtools/matchers.py", line 606, in match
if self.needle not in matchee:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2272: ordinal not in range(128)
When I merge in your patch Robert, I get another failure, this time with the Contains matcher.
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= _with_unicode_ data (test_dbsummari es.TestWebAppEr rorSummary) s.TestWebAppErr orSummary. test_renderHTML _with_unicode_ data ------- ------- ------- ------- ------- ------- ------- ------- ------- matsubara/ devel/canonical /oops-tools/891186- unicodeencodeer ror/src/ oopstools/ oops/test/ test_dbsummarie s.py", line 52, in test_renderHTML _with_unicode_ data assertThat( fp.read( ), Contains(u'some unicode char (\xe1)')) matsubara/ devel/canonical /oops-tools/trunk/ eggs/testtools- 0.9.12- py2.7.egg/ testtools/ testcase. py", line 400, in assertThat match(matchee) matsubara/ devel/canonical /oops-tools/trunk/ eggs/testtools- 0.9.12- py2.7.egg/ testtools/ matchers. py", line 606, in match
ERROR: test_renderHTML
test_dbsummarie
-------
_StringException: Traceback (most recent call last):
File "/home/
self.
File "/home/
mismatch = matcher.
File "/home/
if self.needle not in matchee:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2272: ordinal not in range(128)