======================================================================
ERROR: testtools.tests.test_testcase.TestDetailsProvided.test_addDetail
----------------------------------------------------------------------
_StringException: lost connection during success report of test 'testtools.tests.test_testcase.TestDetailsProvided.test_addDetail'
was because the subunit stream was corrupted, which was in turn because a test was adding content with strings rather than bytes.
This error::
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= tests.test_ testcase. TestDetailsProv ided.test_ addDetail ------- ------- ------- ------- ------- ------- ------- ------- ------- tests.test_ testcase. TestDetailsProv ided.test_ addDetail'
ERROR: testtools.
-------
_StringException: lost connection during success report of test 'testtools.
was because the subunit stream was corrupted, which was in turn because a test was adding content with strings rather than bytes.
Fixed by this::
=== modified file 'testtools/ tests/test_ testcase. py' tests/test_ testcase. py 2011-07-21 09:39:52 +0000 tests/test_ testcase. py 2011-07-26 23:48:11 +0000 eption,
--- a/testtools/
+++ b/testtools/
@@ -18,6 +18,7 @@
skipUnless,
testcase,
)
+from testtools.compat import _b
from testtools.matchers import (
Equals,
MatchesExc
@@ -714,7 +715,7 @@
def get_content(self): ContentType( "text", "foo"), lambda: ['foo']) ContentType( "text", "foo"), lambda: [_b('foo')])
return content.Content(
- content.
+ content.
class TestExpectedFai lure(TestWithDe tails):
Note that when running the tests with testtools.run everything looked fine. I find that worrying.