Newer versions of testtools have {Python26,Python27,Extended}TestResult in testtools...
authorJelmer Vernooij <jelmer@samba.org>
Thu, 13 Oct 2011 00:16:57 +0000 (02:16 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 13 Oct 2011 00:16:57 +0000 (02:16 +0200)
python/subunit/tests/test_test_protocol.py

index 03d921abf11ab3871778a68b081a5a107d1da7b8..c93aabd80cdd25e5f9337a99c1ef05306c78c62b 100644 (file)
@@ -22,11 +22,18 @@ from testtools import skipIf, TestCase
 from testtools.compat import _b, _u, BytesIO, StringIO
 from testtools.content import Content, TracebackContent
 from testtools.content_type import ContentType
-from testtools.tests.helpers import (
-    Python26TestResult,
-    Python27TestResult,
-    ExtendedTestResult,
-    )
+try:
+    from testtools.testresult.doubles import (
+        Python26TestResult,
+        Python27TestResult,
+        ExtendedTestResult,
+        )
+except ImportError:
+    from testtools.tests.helpers import (
+        Python26TestResult,
+        Python27TestResult,
+        ExtendedTestResult,
+        )
 
 import subunit
 from subunit import _remote_exception_str, _remote_exception_str_chunked