summaryrefslogtreecommitdiff
path: root/python/subunit/tests/__init__.py
diff options
context:
space:
mode:
authorThomi Richards <thomi.richards@canonical.com>2013-11-25 11:57:44 +1300
committerThomi Richards <thomi.richards@canonical.com>2013-11-25 11:57:44 +1300
commit9e919f3695634681d2ac59e533ff321ba8c5815e (patch)
treedb6015e540a9e77dc345f37814176828e4dcfade /python/subunit/tests/__init__.py
parent4d3beb5ed8f0601770b7c9eaf0bd64ce9b917547 (diff)
parented03e3e83be5191c58de68fc1d3a04e416160d50 (diff)
downloadsubunit-9e919f3695634681d2ac59e533ff321ba8c5815e.tar.gz
Merge trunk.
Diffstat (limited to 'python/subunit/tests/__init__.py')
-rw-r--r--python/subunit/tests/__init__.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/subunit/tests/__init__.py b/python/subunit/tests/__init__.py
index c9cc7ae..b5a7fdc 100644
--- a/python/subunit/tests/__init__.py
+++ b/python/subunit/tests/__init__.py
@@ -14,8 +14,22 @@
# limitations under that license.
#
+import sys
from unittest import TestLoader
+
+# Before the test module imports to avoid circularity.
+# For testing: different pythons have different str() implementations.
+if sys.version_info > (3, 0):
+ _remote_exception_repr = "testtools.testresult.real._StringException"
+ _remote_exception_str = "Traceback (most recent call last):\ntesttools.testresult.real._StringException"
+ _remote_exception_str_chunked = "57\r\n" + _remote_exception_str + ": boo qux\n0\r\n"
+else:
+ _remote_exception_repr = "_StringException"
+ _remote_exception_str = "Traceback (most recent call last):\n_StringException"
+ _remote_exception_str_chunked = "3D\r\n" + _remote_exception_str + ": boo qux\n0\r\n"
+
+
from subunit.tests import (
test_chunked,
test_details,
@@ -32,6 +46,7 @@ from subunit.tests import (
test_test_results,
)
+
def test_suite():
loader = TestLoader()
result = loader.loadTestsFromModule(test_chunked)