diff options
author | anatoly techtonik <techtonik@gmail.com> | 2014-08-25 01:25:28 +0300 |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2014-08-25 01:25:28 +0300 |
commit | c9cdaeb829d25a2faa7c911308da72cea4641924 (patch) | |
tree | 6b55bff4c43f0bbb79ed4223e5eea3eeef4b6d9d /testing | |
parent | 25f9d79f263747f84b5ac943be656997544a7aa3 (diff) | |
download | scons-c9cdaeb829d25a2faa7c911308da72cea4641924.tar.gz |
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')
-rw-r--r-- | testing/framework/TestUnit/taprunner.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/testing/framework/TestUnit/taprunner.py b/testing/framework/TestUnit/taprunner.py index 31eb9631..5c2e87cd 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): |