summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2014-08-31 13:15:00 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2014-08-31 13:15:00 (GMT)
commit6d0ecf897b6e2ac2429d0e5ced2f8fe9cf29cdc5 (patch)
tree04dfdfd65b5f31a9eb514933070defd1b86d4898
parentade8f8c0aa199049d46d2b19a73964d9fd3c78ef (diff)
parentb5b79f13edf2c4d7f046a6a373579bb8cf7a873e (diff)
downloadSCons-6d0ecf897b6e2ac2429d0e5ced2f8fe9cf29cdc5.zip
SCons-6d0ecf897b6e2ac2429d0e5ced2f8fe9cf29cdc5.tar.gz
SCons-6d0ecf897b6e2ac2429d0e5ced2f8fe9cf29cdc5.tar.bz2
Merged in williamblevins/scons4 (pull request #180, issue 2935)
-rw-r--r--test/Copy-Symlinks.py4
-rw-r--r--testing/framework/TestUnit/taprunner.py12
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):