From c9cdaeb829d25a2faa7c911308da72cea4641924 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Mon, 25 Aug 2014 01:25:28 +0300 Subject: 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 --- testing/framework/TestUnit/taprunner.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'testing') 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 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): -- cgit v1.2.1