summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-10-13 02:16:57 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-10-13 02:16:57 +0200
commit7384e95b6e49ea544739abfdd52e846eab292f69 (patch)
treed005ec7fcaf19a5a3bf98d22ce5ef2fe5ab234f5 /python
parentdc1985ebe6751f309abd605a14c3fddb0b2600b9 (diff)
downloadsubunit-git-7384e95b6e49ea544739abfdd52e846eab292f69.tar.gz
Newer versions of testtools have {Python26,Python27,Extended}TestResult in testtools.testresult.doubles.
Diffstat (limited to 'python')
-rw-r--r--python/subunit/tests/test_test_protocol.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/python/subunit/tests/test_test_protocol.py b/python/subunit/tests/test_test_protocol.py
index 03d921a..c93aabd 100644
--- a/python/subunit/tests/test_test_protocol.py
+++ b/python/subunit/tests/test_test_protocol.py
@@ -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