import unittest
import os
-from testtools import skipIf, TestCase
+from testtools import skipIf, TestCase, TestResult
from testtools.compat import _b, _u, BytesIO
from testtools.content import Content, TracebackContent, text_content
from testtools.content_type import ContentType
-from testtools.testresult.real import _details_to_str
try:
from testtools.testresult.doubles import (
Python26TestResult,
import subunit.iso8601 as iso8601
+def details_to_str(details):
+ return TestResult()._err_details_to_string(None, details=details)
+
+
class TestTestImports(unittest.TestCase):
def test_imports(self):
self.assertEqual(
client.failures,
[(bing, _remote_exception_str + ": "
- + _details_to_str({'traceback': text_content(traceback)}, 'traceback') + "\n")])
+ + details_to_str({'traceback': text_content(traceback)}) + "\n")])
self.assertEqual(client.testsRun, 3)
def test_non_test_characters_forwarded_immediately(self):
value = details
else:
if error_message is not None:
- value = subunit.RemoteError(
- _details_to_str(details, special='traceback'))
+ value = subunit.RemoteError(details_to_str(details))
else:
value = subunit.RemoteError()
self.assertEqual([