Use the newly exposed test helpers from testtools trunk.
[third_party/subunit] / python / subunit / __init__.py
index b5f622da0d9f9b9ac5974f56e0a995c00914c98a..c7e9e66e3522e20f81e049ef6e0cd9d25a77efc7 100644 (file)
@@ -127,7 +127,15 @@ import unittest
 
 import iso8601
 from testtools import content, content_type, ExtendedToOriginalDecorator
-from testtools.testresult import _StringException
+try:
+    from testtools.testresult.real import _StringException
+    RemoteException = _StringException
+    _remote_exception_str = '_StringException' # For testing.
+except ImportError:
+    raise ImportError ("testtools.testresult does not contain _StringException, check your version.")
+
+
+from testtools.testresult.real import _StringException
 
 import chunked, details, test_results
 
@@ -508,13 +516,6 @@ class TestProtocolServer(object):
         self._stream.write(line)
 
 
-try:
-    from testtools.testresult import _StringException as RemoteException
-    _remote_exception_str = '_StringException' # For testing.
-except ImportError:
-    raise ImportError ("testtools.testresult does not contain _StringException, check your version.")
-
-
 class TestProtocolClient(unittest.TestResult):
     """A TestResult which generates a subunit stream for a test run.