summaryrefslogtreecommitdiffstats
path: root/testing/framework
diff options
context:
space:
mode:
authoranatoly techtonik <techtonik@gmail.com>2014-08-24 22:25:28 (GMT)
committeranatoly techtonik <techtonik@gmail.com>2014-08-24 22:25:28 (GMT)
commitb5b79f13edf2c4d7f046a6a373579bb8cf7a873e (patch)
tree6b55bff4c43f0bbb79ed4223e5eea3eeef4b6d9d /testing/framework
parent0da747281aa70058b5637a4ebd6c121858419e95 (diff)
downloadSCons-b5b79f13edf2c4d7f046a6a373579bb8cf7a873e.zip
SCons-b5b79f13edf2c4d7f046a6a373579bb8cf7a873e.tar.gz
SCons-b5b79f13edf2c4d7f046a6a373579bb8cf7a873e.tar.bz2
0.3 - fixed used imports that failed on Python 2.6
Crash evidence: http://buildbot.scons.org/builders/debian6-python-2.6/builds/54/steps/shell/logs/stdio
Diffstat (limited to 'testing/framework')
-rw-r--r--testing/framework/TestUnit/taprunner.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/testing/framework/TestUnit/taprunner.py b/testing/framework/TestUnit/taprunner.py
index 31eb963..5c2e87c 100644
--- a/testing/framework/TestUnit/taprunner.py
+++ b/testing/framework/TestUnit/taprunner.py
@@ -6,13 +6,21 @@ Public domain work by:
anatoly techtonik <techtonik@gmail.com>
Changes:
+ 0.3 - fixed used imports that failed on Python 2.6
0.2 - removed unused import that failed on Python 2.6
0.1 - initial release
"""
-from unittest.runner import TextTestRunner, TextTestResult
+__version__ = "0.3"
+
+
+from unittest import TextTestRunner
+try:
+ from unittest import TextTestResult
+except ImportError:
+ # Python 2.6
+ from unittest import _TextTestResult as TextTestResult
-__version__ = "0.2"
class TAPTestResult(TextTestResult):