diff options
-rw-r--r-- | test/Copy-Symlinks.py | 4 | ||||
-rw-r--r-- | testing/framework/TestUnit/taprunner.py | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/test/Copy-Symlinks.py b/test/Copy-Symlinks.py index 35e4aa0..640e76c 100644 --- a/test/Copy-Symlinks.py +++ b/test/Copy-Symlinks.py @@ -36,11 +36,11 @@ import TestSCons import SCons.Defaults SCons.Defaults.DefaultEnvironment( tools = [] ) +test = TestSCons.TestSCons() + if not hasattr(os, 'symlink'): test.skip_test('No os.symlink() method, no symlinks to test.\n') -test = TestSCons.TestSCons() - filelinkToCopy = 'filelinkToCopy' fileToLink = 'file.in' fileContents = 'stuff n things\n' 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): |