summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xCHANGES.txt1
-rw-r--r--SCons/DefaultsTests.py1
-rw-r--r--SCons/EnvironmentValues.py1
-rw-r--r--SCons/ErrorsTests.py2
-rw-r--r--SCons/ExecutorTests.py1
-rw-r--r--SCons/JobTests.py4
-rw-r--r--SCons/MemoizeTests.py1
-rw-r--r--SCons/Node/AliasTests.py1
-rw-r--r--SCons/Node/FSTests.py1
-rw-r--r--SCons/Node/NodeTests.py2
-rw-r--r--SCons/Node/__init__.py25
-rw-r--r--SCons/PathListTests.py1
-rw-r--r--SCons/Platform/aix.py3
-rw-r--r--SCons/Platform/posix.py3
-rw-r--r--SCons/Platform/win32.py1
-rw-r--r--SCons/SConsignTests.py1
-rw-r--r--SCons/Scanner/DirTests.py1
-rw-r--r--SCons/Scanner/IDLTests.py1
-rw-r--r--SCons/Scanner/LaTeXTests.py1
-rw-r--r--SCons/Scanner/ProgTests.py1
-rw-r--r--SCons/Scanner/RC.py1
-rw-r--r--SCons/Scanner/RCTests.py1
-rw-r--r--SCons/Scanner/ScannerTests.py1
-rw-r--r--SCons/Script/SConscript.py1
-rw-r--r--SCons/SubstTests.py2
-rw-r--r--SCons/Taskmaster.py2
-rw-r--r--SCons/TaskmasterTests.py6
-rw-r--r--SCons/Tool/JavaCommonTests.py1
-rw-r--r--SCons/Tool/MSCommon/__init__.py4
-rw-r--r--SCons/Tool/MSCommon/arch.py1
-rw-r--r--SCons/Tool/MSCommon/vc.py1
-rw-r--r--SCons/Tool/ToolTests.py1
-rw-r--r--SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py2
-rw-r--r--SCons/Tool/fortran.py1
-rw-r--r--SCons/Tool/gcc.py1
-rw-r--r--SCons/Tool/gxx.py3
-rw-r--r--SCons/Tool/intelc.py6
-rw-r--r--SCons/Tool/linkCommon/__init__.py1
-rw-r--r--SCons/Tool/linkloc.py1
-rw-r--r--SCons/Tool/msginit.py1
-rw-r--r--SCons/Tool/msvc.py2
-rw-r--r--SCons/Tool/packaging/rpm.py1
-rw-r--r--SCons/Tool/qt.py1
-rw-r--r--SCons/Tool/textfile.py2
-rw-r--r--SCons/Tool/wixTests.py1
-rw-r--r--SCons/Util.py1
-rw-r--r--SCons/Variables/BoolVariableTests.py1
-rw-r--r--SCons/Variables/EnumVariableTests.py1
-rw-r--r--SCons/Variables/ListVariableTests.py1
-rw-r--r--SCons/Variables/PackageVariableTests.py1
-rw-r--r--SCons/Variables/PathVariableTests.py1
-rw-r--r--SCons/Variables/VariablesTests.py1
-rw-r--r--SCons/WarningsTests.py1
-rw-r--r--SCons/compat/__init__.py2
-rw-r--r--test/AR/AR.py1
-rw-r--r--test/AR/ARFLAGS.py1
-rw-r--r--test/AS/AS.py2
-rw-r--r--test/AS/ASFLAGS.py1
-rw-r--r--test/AS/ASPP.py2
-rw-r--r--test/AS/ASPPFLAGS.py1
-rw-r--r--test/Actions/append.py1
-rw-r--r--test/Actions/pre-post.py1
-rw-r--r--test/Builder/errors.py1
-rw-r--r--test/CC/CCVERSION.py1
-rw-r--r--test/CC/SHCC.py1
-rw-r--r--test/CFILESUFFIX.py1
-rw-r--r--test/CXX/CXX.py1
-rw-r--r--test/CXX/CXXFILESUFFIX.py1
-rw-r--r--test/CacheDir/CacheDir_TryCompile.py1
-rw-r--r--test/CacheDir/NoCache.py2
-rw-r--r--test/CacheDir/multiple-targets.py2
-rw-r--r--test/CacheDir/option--cd.py2
-rw-r--r--test/CacheDir/option--cr.py2
-rw-r--r--test/CacheDir/option--cs.py2
-rwxr-xr-xtest/CacheDir/readonly-cache.py1
-rw-r--r--test/CacheDir/scanner-target.py2
-rw-r--r--test/Clean/Option.py1
-rw-r--r--test/CommandGenerator.py1
-rw-r--r--test/Configure/VariantDir2.py1
-rw-r--r--test/Configure/config-h.py1
-rw-r--r--test/Copy-Symlinks.py2
-rw-r--r--test/D/Issues/2994/Common/D_changed_DFLAGS_not_rebuilding.py2
-rw-r--r--test/D/MixedDAndC/Common/common.py1
-rw-r--r--test/Decider/MD5-winonly-firstbuild.py2
-rw-r--r--test/Dir/PyPackageDir/PyPackageDir.py1
-rw-r--r--test/Docbook/basedir/htmlchunked/htmlchunked_cmd.py1
-rw-r--r--test/Docbook/basedir/htmlhelp/htmlhelp_cmd.py1
-rw-r--r--test/Docbook/basedir/slideshtml/slideshtml_cmd.py1
-rw-r--r--test/Docbook/basic/htmlchunked/htmlchunked_cmd.py1
-rw-r--r--test/Docbook/basic/slideshtml/slideshtml_cmd.py1
-rw-r--r--test/Errors/execute-a-directory.py1
-rw-r--r--test/Errors/non-executable-file.py1
-rw-r--r--test/Fortran/F03.py1
-rw-r--r--test/Fortran/F03FILESUFFIXES.py1
-rw-r--r--test/Fortran/F03FILESUFFIXES2.py1
-rw-r--r--test/Fortran/F03FLAGS.py1
-rw-r--r--test/Fortran/F08.py1
-rw-r--r--test/Fortran/F08FILESUFFIXES.py1
-rw-r--r--test/Fortran/F08FILESUFFIXES2.py1
-rw-r--r--test/Fortran/F08FLAGS.py1
-rw-r--r--test/Fortran/F77.py1
-rw-r--r--test/Fortran/F77FILESUFFIXES.py1
-rw-r--r--test/Fortran/F77FILESUFFIXES2.py1
-rw-r--r--test/Fortran/F77FLAGS.py1
-rw-r--r--test/Fortran/F90.py1
-rw-r--r--test/Fortran/F90FILESUFFIXES.py1
-rw-r--r--test/Fortran/F90FILESUFFIXES2.py1
-rw-r--r--test/Fortran/F90FLAGS.py1
-rw-r--r--test/Fortran/F95.py1
-rw-r--r--test/Fortran/F95FILESUFFIXES.py1
-rw-r--r--test/Fortran/F95FILESUFFIXES2.py1
-rw-r--r--test/Fortran/F95FLAGS.py1
-rw-r--r--test/Fortran/FORTRAN.py1
-rw-r--r--test/Fortran/FORTRANFILESUFFIXES.py1
-rw-r--r--test/Fortran/FORTRANFILESUFFIXES2.py1
-rw-r--r--test/Fortran/FORTRANFLAGS.py1
-rw-r--r--test/Fortran/FORTRANPPFILESUFFIXES.py3
-rw-r--r--test/Fortran/SHF03.py1
-rw-r--r--test/Fortran/SHF08.py1
-rw-r--r--test/Fortran/SHF77.py1
-rw-r--r--test/Fortran/SHF77FLAGS.py1
-rw-r--r--test/Fortran/SHF90.py1
-rw-r--r--test/Fortran/SHF90FLAGS.py1
-rw-r--r--test/Fortran/SHF95.py1
-rw-r--r--test/Fortran/SHF95FLAGS.py1
-rw-r--r--test/Fortran/SHFORTRAN.py1
-rw-r--r--test/Fortran/SHFORTRANFLAGS.py1
-rw-r--r--test/Install/directories.py1
-rw-r--r--test/Install/non-ascii-name.py1
-rw-r--r--test/Java/JAR.py1
-rw-r--r--test/Java/JARCHDIR.py1
-rw-r--r--test/Java/JARFLAGS.py1
-rw-r--r--test/Java/jar_not_in_PATH.py1
-rw-r--r--test/Java/nested-classes.py1
-rw-r--r--test/Java/swig-dependencies.py1
-rw-r--r--test/LEX/LEX.py1
-rw-r--r--test/LEX/LEXFLAGS.py1
-rw-r--r--test/LINK/LDMODULEVERSIONFLAGS.py2
-rw-r--r--test/LINK/LINK.py1
-rw-r--r--test/LINK/LINKFLAGS.py1
-rw-r--r--test/LINK/SHLIBVERSIONFLAGS.py2
-rw-r--r--test/LINK/SHLINK.py1
-rw-r--r--test/LINK/SHLINKFLAGS.py1
-rw-r--r--test/LINK/VersionedLib.py1
-rw-r--r--test/Libs/SharedLibrary-update-deps.py1
-rw-r--r--test/MSVC/PCHSTOP-errors.py1
-rw-r--r--test/MSVC/mssdk.py1
-rw-r--r--test/MSVC/pch-basics.py1
-rw-r--r--test/MSVC/pch-spaces-subdir.py1
-rw-r--r--test/MSVS/common-prefix.py1
-rw-r--r--test/MSVS/runfile.py1
-rw-r--r--test/MSVS/vs-6.0-exec.py1
-rw-r--r--test/MSVS/vs-7.0-exec.py1
-rw-r--r--test/MSVS/vs-7.0-scc-files.py1
-rw-r--r--test/MSVS/vs-7.0-scc-legacy-files.py1
-rw-r--r--test/MSVS/vs-7.1-exec.py1
-rw-r--r--test/MSVS/vs-7.1-scc-files.py1
-rw-r--r--test/MSVS/vs-7.1-scc-legacy-files.py1
-rw-r--r--test/MinGW/mingw_uses_comstr_issue_2799.py1
-rw-r--r--test/Progress/TARGET.py1
-rw-r--r--test/Progress/spinner.py1
-rw-r--r--test/Repository/Install.py1
-rw-r--r--test/Repository/InstallAs.py1
-rw-r--r--test/Repository/M4.py1
-rw-r--r--test/SConsignFile/default.py1
-rw-r--r--test/SConsignFile/explicit-file.py1
-rw-r--r--test/SConsignFile/use-dumbdbm.py10
-rw-r--r--test/SConsignFile/use-gdbm.py10
-rw-r--r--test/SWIG/SWIGFLAGS.py1
-rw-r--r--test/SWIG/live.py1
-rw-r--r--test/Scanner/Scanner.py1
-rw-r--r--test/TEX/generated_files.py1
-rw-r--r--test/TEX/synctex.py1
-rw-r--r--test/TempFileMunge/TEMPFILEPREFIX.py2
-rw-r--r--test/TempFileMunge/TEMPFILESUFFIX.py2
-rw-r--r--test/Variables/BoolVariable.py1
-rw-r--r--test/Variables/EnumVariable.py1
-rw-r--r--test/Variables/PackageVariable.py1
-rw-r--r--test/YACC/YACCFLAGS.py1
-rw-r--r--test/YACC/live.py2
-rw-r--r--test/ZIP/ZIPROOT.py2
-rw-r--r--test/emitter.py1
-rw-r--r--test/exitfns.py1
-rw-r--r--test/gettext/MOFiles/UserExamples.py1
-rw-r--r--test/gettext/POUpdate/UserExamples.py1
-rw-r--r--test/gettext/Translate/MultiCatalog.py1
-rw-r--r--test/ignore-command.py1
-rw-r--r--test/import.py1
-rw-r--r--test/multiline.py1
-rw-r--r--test/no-arguments.py1
-rw-r--r--test/option--random.py1
-rw-r--r--test/option--tree.py1
-rw-r--r--test/option-k.py1
-rw-r--r--test/option/debug-count.py7
-rw-r--r--test/option/debug-objects.py7
-rw-r--r--test/packaging/place-files-in-subdirectory.py1
-rw-r--r--test/python-version.py1
-rw-r--r--test/runtest/testlistfile.py1
-rw-r--r--test/scons-time/func/prefix.py1
-rw-r--r--test/scons-time/run/archive/zip.py1
-rw-r--r--test/sconsign/script/SConsignFile.py1
-rw-r--r--test/silent-command.py1
-rw-r--r--test/srcchange.py1
-rw-r--r--test/subdir.py1
-rw-r--r--test/symlink/dangling-include.py1
-rw-r--r--test/symlink/dangling-source.py1
-rw-r--r--test/timestamp-fallback.py1
-rw-r--r--test/tool_args.py1
-rw-r--r--test/toolpath/basic.py1
-rw-r--r--test/toolpath/nested/nested.py1
-rw-r--r--test/toolpath/relative_import/relative_import.py1
-rw-r--r--test/update-release-info/update-release-info.py3
-rw-r--r--test/virtualenv/activated/option/enable-virtualenv.py1
-rw-r--r--test/virtualenv/activated/option/ignore-virtualenv.py1
-rw-r--r--test/virtualenv/activated/virtualenv_activated_python.py1
-rw-r--r--test/virtualenv/activated/virtualenv_detect_virtualenv.py1
-rw-r--r--test/virtualenv/regularenv/virtualenv_detect_regularenv.py1
-rw-r--r--test/virtualenv/unactivated/virtualenv_unactivated_python.py1
-rw-r--r--testing/framework/TestCmd.py1
-rw-r--r--testing/framework/TestCmdTests.py2
-rw-r--r--testing/framework/TestCommon.py1
-rw-r--r--testing/framework/TestCommonTests.py2
-rw-r--r--testing/framework/TestSConsign.py1
223 files changed, 30 insertions, 300 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index fc1d857..cb01763 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -46,6 +46,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- merging --param arguments did not work (issue #3107);
- passing a dict to merge where the values are strings failed (issue #2961).
- Include previously-excluded SideEffect section in User Guide.
+ - Clean up unneeded imports (autoflake tool).
From Joachim Kuebart:
- Suppress missing SConscript deprecation warning if `must_exist=False`
diff --git a/SCons/DefaultsTests.py b/SCons/DefaultsTests.py
index 34941bc..d81d9c2 100644
--- a/SCons/DefaultsTests.py
+++ b/SCons/DefaultsTests.py
@@ -26,7 +26,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.compat
import os
-import sys
import unittest
import TestCmd
diff --git a/SCons/EnvironmentValues.py b/SCons/EnvironmentValues.py
index aaa71d0..c1356ca 100644
--- a/SCons/EnvironmentValues.py
+++ b/SCons/EnvironmentValues.py
@@ -72,7 +72,6 @@ class EnvironmentValue:
# Now we need to parse the specified string
result = _dollar_exps.sub(sub_match, args)
print(result)
- pass
except TypeError:
# likely callable? either way we don't parse
self._parsed = self.value
diff --git a/SCons/ErrorsTests.py b/SCons/ErrorsTests.py
index d777ba1..f3e4ca2 100644
--- a/SCons/ErrorsTests.py
+++ b/SCons/ErrorsTests.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import errno
-import os
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/ExecutorTests.py b/SCons/ExecutorTests.py
index 41728ef..82f74ed 100644
--- a/SCons/ExecutorTests.py
+++ b/SCons/ExecutorTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Executor
diff --git a/SCons/JobTests.py b/SCons/JobTests.py
index 7fc969b..33ad3f9 100644
--- a/SCons/JobTests.py
+++ b/SCons/JobTests.py
@@ -211,7 +211,7 @@ class Taskmaster:
try:
import threading
self.guard = threading.Lock()
- except:
+ except ImportError:
self.guard = DummyLock()
# keep track of the order tasks are begun in
@@ -255,7 +255,7 @@ class ParallelTestCase(unittest.TestCase):
try:
import threading
- except:
+ except ImportError:
raise NoThreadsException()
taskmaster = Taskmaster(num_tasks, self, RandomTask)
diff --git a/SCons/MemoizeTests.py b/SCons/MemoizeTests.py
index f1e5550..163786e 100644
--- a/SCons/MemoizeTests.py
+++ b/SCons/MemoizeTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Memoize
diff --git a/SCons/Node/AliasTests.py b/SCons/Node/AliasTests.py
index 613a5c0..701cdea 100644
--- a/SCons/Node/AliasTests.py
+++ b/SCons/Node/AliasTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Node/FSTests.py b/SCons/Node/FSTests.py
index 77c6dbb..e17ca3d 100644
--- a/SCons/Node/FSTests.py
+++ b/SCons/Node/FSTests.py
@@ -1694,7 +1694,6 @@ class FSTestCase(_tempdirTestCase):
except AttributeError:
# could be python 3.7 or newer, make sure splitdrive can do UNC
assert ntpath.splitdrive(r'\\split\drive\test')[0] == r'\\split\drive'
- pass
path = strip_slash(path)
return '//' + path[1:]
diff --git a/SCons/Node/NodeTests.py b/SCons/Node/NodeTests.py
index 729be01..1ed60db 100644
--- a/SCons/Node/NodeTests.py
+++ b/SCons/Node/NodeTests.py
@@ -25,9 +25,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.compat
import collections
-import os
import re
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Node/__init__.py b/SCons/Node/__init__.py
index f7d9289..28772eb 100644
--- a/SCons/Node/__init__.py
+++ b/SCons/Node/__init__.py
@@ -43,7 +43,6 @@ be able to depend on any other type of "thing."
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import collections
import copy
from itertools import chain
@@ -823,25 +822,21 @@ class Node(object, metaclass=NoSlotsPyPy):
def release_target_info(self):
"""Called just after this node has been marked
- up-to-date or was built completely.
+ up-to-date or was built completely.
- This is where we try to release as many target node infos
- as possible for clean builds and update runs, in order
- to minimize the overall memory consumption.
+ This is where we try to release as many target node infos
+ as possible for clean builds and update runs, in order
+ to minimize the overall memory consumption.
- By purging attributes that aren't needed any longer after
- a Node (=File) got built, we don't have to care that much how
- many KBytes a Node actually requires...as long as we free
- the memory shortly afterwards.
+ By purging attributes that aren't needed any longer after
+ a Node (=File) got built, we don't have to care that much how
+ many KBytes a Node actually requires...as long as we free
+ the memory shortly afterwards.
- @see: built() and File.release_target_info()
- """
+ @see: built() and File.release_target_info()
+ """
pass
- #
- #
- #
-
def add_to_waiting_s_e(self, node):
self.waiting_s_e.add(node)
diff --git a/SCons/PathListTests.py b/SCons/PathListTests.py
index 80f2b9c..e150e26 100644
--- a/SCons/PathListTests.py
+++ b/SCons/PathListTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import TestUnit
diff --git a/SCons/Platform/aix.py b/SCons/Platform/aix.py
index 247437a..07d9134 100644
--- a/SCons/Platform/aix.py
+++ b/SCons/Platform/aix.py
@@ -32,7 +32,6 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import subprocess
from . import posix
@@ -70,8 +69,6 @@ def get_xlc(env, xlc=None, packages=[]):
or ('/' not in xlc and filename.endswith('/' + xlc)):
xlcVersion = fileset.split()[1]
xlcPath, sep, xlc = filename.rpartition('/')
- pass
- pass
return (xlcPath, xlc, xlcVersion)
def generate(env):
diff --git a/SCons/Platform/posix.py b/SCons/Platform/posix.py
index ad4e859..f0f71a8 100644
--- a/SCons/Platform/posix.py
+++ b/SCons/Platform/posix.py
@@ -33,10 +33,7 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import errno
-import os
-import os.path
import subprocess
-import sys
import select
import SCons.Util
diff --git a/SCons/Platform/win32.py b/SCons/Platform/win32.py
index 84fd8f8..0ffe349 100644
--- a/SCons/Platform/win32.py
+++ b/SCons/Platform/win32.py
@@ -288,7 +288,6 @@ def get_program_files_dir():
val, tok = SCons.Util.RegQueryValueEx(k, 'ProgramFilesDir')
except SCons.Util.RegError:
val = ''
- pass
if val == '':
# A reasonable default if we can't read the registry
diff --git a/SCons/SConsignTests.py b/SCons/SConsignTests.py
index 84c1d41..9aa3b96 100644
--- a/SCons/SConsignTests.py
+++ b/SCons/SConsignTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import sys
import unittest
import TestCmd
diff --git a/SCons/Scanner/DirTests.py b/SCons/Scanner/DirTests.py
index 8f866c4..add46b5 100644
--- a/SCons/Scanner/DirTests.py
+++ b/SCons/Scanner/DirTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
-import sys
import unittest
import TestCmd
diff --git a/SCons/Scanner/IDLTests.py b/SCons/Scanner/IDLTests.py
index 9cbb73d..73ae6d8 100644
--- a/SCons/Scanner/IDLTests.py
+++ b/SCons/Scanner/IDLTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import unittest
-import sys
import os
import os.path
diff --git a/SCons/Scanner/LaTeXTests.py b/SCons/Scanner/LaTeXTests.py
index 409699c..17ec25c 100644
--- a/SCons/Scanner/LaTeXTests.py
+++ b/SCons/Scanner/LaTeXTests.py
@@ -27,7 +27,6 @@ import SCons.compat
import collections
import os
-import sys
import unittest
import TestCmd
diff --git a/SCons/Scanner/ProgTests.py b/SCons/Scanner/ProgTests.py
index b91a2ad..dd8141d 100644
--- a/SCons/Scanner/ProgTests.py
+++ b/SCons/Scanner/ProgTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
-import sys
import unittest
import TestCmd
diff --git a/SCons/Scanner/RC.py b/SCons/Scanner/RC.py
index abaaef7..0836b45 100644
--- a/SCons/Scanner/RC.py
+++ b/SCons/Scanner/RC.py
@@ -30,7 +30,6 @@ Definition Language) files.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import re
import SCons.Node.FS
import SCons.Scanner
diff --git a/SCons/Scanner/RCTests.py b/SCons/Scanner/RCTests.py
index 487250e..1a19ef9 100644
--- a/SCons/Scanner/RCTests.py
+++ b/SCons/Scanner/RCTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import unittest
-import sys
import collections
import os
diff --git a/SCons/Scanner/ScannerTests.py b/SCons/Scanner/ScannerTests.py
index bf9879e..34709ae 100644
--- a/SCons/Scanner/ScannerTests.py
+++ b/SCons/Scanner/ScannerTests.py
@@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.compat
import collections
-import sys
import unittest
import TestUnit
diff --git a/SCons/Script/SConscript.py b/SCons/Script/SConscript.py
index e7f53f5..8cd494f 100644
--- a/SCons/Script/SConscript.py
+++ b/SCons/Script/SConscript.py
@@ -46,7 +46,6 @@ from SCons.Util import is_List, is_String, is_Dict, flatten
from SCons.Node import SConscriptNodes
from . import Main
-import collections
import os
import os.path
import re
diff --git a/SCons/SubstTests.py b/SCons/SubstTests.py
index 07eb61d..41c2884 100644
--- a/SCons/SubstTests.py
+++ b/SCons/SubstTests.py
@@ -25,10 +25,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.compat
import os
-import sys
import unittest
-from collections import UserDict
import SCons.Errors
diff --git a/SCons/Taskmaster.py b/SCons/Taskmaster.py
index bfb7dc1..ad4f147 100644
--- a/SCons/Taskmaster.py
+++ b/SCons/Taskmaster.py
@@ -54,9 +54,7 @@ __doc__ = """
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import operator
import sys
-import traceback
from abc import ABC, abstractmethod
from itertools import chain
diff --git a/SCons/TaskmasterTests.py b/SCons/TaskmasterTests.py
index c11d8e8..e651efd 100644
--- a/SCons/TaskmasterTests.py
+++ b/SCons/TaskmasterTests.py
@@ -24,7 +24,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.compat
-import copy
import sys
import unittest
@@ -867,10 +866,9 @@ class TaskmasterTestCase(unittest.TestCase):
except MyException as e:
exc_caught = 1
exc_value = e
- except Exception as e:
- exc_actually_caught = e
+ except Exception as exc_actually_caught:
pass
- assert exc_caught, "did not catch expected MyException: %s"%exc_actually_caught
+ assert exc_caught, "did not catch expected MyException: %s" % exc_actually_caught
assert str(exc_value) == "exception value", exc_value
assert built_text is None, built_text
diff --git a/SCons/Tool/JavaCommonTests.py b/SCons/Tool/JavaCommonTests.py
index 83354b8..f35cb9e 100644
--- a/SCons/Tool/JavaCommonTests.py
+++ b/SCons/Tool/JavaCommonTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
-import sys
import unittest
import fnmatch
diff --git a/SCons/Tool/MSCommon/__init__.py b/SCons/Tool/MSCommon/__init__.py
index be7720a..ee8f2bd 100644
--- a/SCons/Tool/MSCommon/__init__.py
+++ b/SCons/Tool/MSCommon/__init__.py
@@ -27,10 +27,6 @@ __doc__ = """
Common functions for Microsoft Visual Studio and Visual C/C++.
"""
-import copy
-import os
-import re
-import subprocess
import SCons.Errors
import SCons.Platform.win32
diff --git a/SCons/Tool/MSCommon/arch.py b/SCons/Tool/MSCommon/arch.py
index ba57a2c..0032422 100644
--- a/SCons/Tool/MSCommon/arch.py
+++ b/SCons/Tool/MSCommon/arch.py
@@ -26,7 +26,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
__doc__ = """Module to define supported Windows chip architectures.
"""
-import os
class ArchDefinition:
"""
diff --git a/SCons/Tool/MSCommon/vc.py b/SCons/Tool/MSCommon/vc.py
index 886288a..9a43ae1 100644
--- a/SCons/Tool/MSCommon/vc.py
+++ b/SCons/Tool/MSCommon/vc.py
@@ -43,7 +43,6 @@ import SCons.Util
import subprocess
import os
import platform
-import sys
from string import digits as string_digits
from subprocess import PIPE
diff --git a/SCons/Tool/ToolTests.py b/SCons/Tool/ToolTests.py
index b7c42b7..9a6d9b5 100644
--- a/SCons/Tool/ToolTests.py
+++ b/SCons/Tool/ToolTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import sys
import unittest
import TestUnit
diff --git a/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py b/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py
index 3d53bf7..d79ece3 100644
--- a/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py
+++ b/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py
@@ -1,7 +1,5 @@
# docbook.py: extension module
# $Id: docbook.py 8353 2009-03-17 16:57:50Z mzjn $
-import sys
-import string
import libxml2
import libxslt
import re
diff --git a/SCons/Tool/fortran.py b/SCons/Tool/fortran.py
index aeb9130..0a68df6 100644
--- a/SCons/Tool/fortran.py
+++ b/SCons/Tool/fortran.py
@@ -33,7 +33,6 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import re
import SCons.Action
import SCons.Defaults
diff --git a/SCons/Tool/gcc.py b/SCons/Tool/gcc.py
index d56f6a0..37626ef 100644
--- a/SCons/Tool/gcc.py
+++ b/SCons/Tool/gcc.py
@@ -34,7 +34,6 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
from . import cc
-import os
import re
import subprocess
diff --git a/SCons/Tool/gxx.py b/SCons/Tool/gxx.py
index 4b86327..88186cb 100644
--- a/SCons/Tool/gxx.py
+++ b/SCons/Tool/gxx.py
@@ -33,9 +33,6 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
-import re
-import subprocess
import SCons.Tool
import SCons.Util
diff --git a/SCons/Tool/intelc.py b/SCons/Tool/intelc.py
index 38bdc32..5025719 100644
--- a/SCons/Tool/intelc.py
+++ b/SCons/Tool/intelc.py
@@ -32,7 +32,11 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import math, sys, os.path, glob, string, re
+import glob
+import math
+import os.path
+import re
+import sys
is_windows = sys.platform == 'win32'
is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or
diff --git a/SCons/Tool/linkCommon/__init__.py b/SCons/Tool/linkCommon/__init__.py
index f11aa14..f66ad6d 100644
--- a/SCons/Tool/linkCommon/__init__.py
+++ b/SCons/Tool/linkCommon/__init__.py
@@ -46,7 +46,6 @@ def _call_linker_cb(env, callback, args, result=None):
except (KeyError, TypeError):
if Verbose:
print('_call_linker_cb: env["LINKCALLBACKS"][%r] not found or can not be used' % callback)
- pass
else:
if Verbose:
print('_call_linker_cb: env["LINKCALLBACKS"][%r] found' % callback)
diff --git a/SCons/Tool/linkloc.py b/SCons/Tool/linkloc.py
index 0ca37b3..6ee5d61 100644
--- a/SCons/Tool/linkloc.py
+++ b/SCons/Tool/linkloc.py
@@ -34,7 +34,6 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import re
import SCons.Action
diff --git a/SCons/Tool/msginit.py b/SCons/Tool/msginit.py
index a94cb85..4b72c30 100644
--- a/SCons/Tool/msginit.py
+++ b/SCons/Tool/msginit.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.Warnings
import SCons.Builder
-import re
#############################################################################
def _optional_no_translator_flag(env):
diff --git a/SCons/Tool/msvc.py b/SCons/Tool/msvc.py
index b9eb60a..a06a434 100644
--- a/SCons/Tool/msvc.py
+++ b/SCons/Tool/msvc.py
@@ -35,8 +35,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
import os
-import re
-import sys
import SCons.Action
import SCons.Builder
diff --git a/SCons/Tool/packaging/rpm.py b/SCons/Tool/packaging/rpm.py
index a026e45..cdeabcf 100644
--- a/SCons/Tool/packaging/rpm.py
+++ b/SCons/Tool/packaging/rpm.py
@@ -27,7 +27,6 @@ The rpm packager.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import SCons.Builder
import SCons.Tool.rpmutils
diff --git a/SCons/Tool/qt.py b/SCons/Tool/qt.py
index fab1625..d8a51b2 100644
--- a/SCons/Tool/qt.py
+++ b/SCons/Tool/qt.py
@@ -35,7 +35,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
import re
-import glob
import SCons.Action
import SCons.Builder
diff --git a/SCons/Tool/textfile.py b/SCons/Tool/textfile.py
index bb8a0f9..10e07f9 100644
--- a/SCons/Tool/textfile.py
+++ b/SCons/Tool/textfile.py
@@ -48,8 +48,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons
-import os
-import re
from SCons.Node import Node
from SCons.Node.Python import Value
diff --git a/SCons/Tool/wixTests.py b/SCons/Tool/wixTests.py
index 6039115..5b255d9 100644
--- a/SCons/Tool/wixTests.py
+++ b/SCons/Tool/wixTests.py
@@ -26,7 +26,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import unittest
import os.path
import os
-import sys
import SCons.Errors
from SCons.Tool.wix import *
diff --git a/SCons/Util.py b/SCons/Util.py
index ae204a1..8b31d49 100644
--- a/SCons/Util.py
+++ b/SCons/Util.py
@@ -31,7 +31,6 @@ import sys
import copy
import re
import types
-import codecs
import pprint
import hashlib
from collections import UserDict, UserList, UserString, OrderedDict
diff --git a/SCons/Variables/BoolVariableTests.py b/SCons/Variables/BoolVariableTests.py
index 3184407..40ab9be 100644
--- a/SCons/Variables/BoolVariableTests.py
+++ b/SCons/Variables/BoolVariableTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Variables/EnumVariableTests.py b/SCons/Variables/EnumVariableTests.py
index 4ecb8bd..248d6ef 100644
--- a/SCons/Variables/EnumVariableTests.py
+++ b/SCons/Variables/EnumVariableTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Variables/ListVariableTests.py b/SCons/Variables/ListVariableTests.py
index 8f79e07..a977fb7 100644
--- a/SCons/Variables/ListVariableTests.py
+++ b/SCons/Variables/ListVariableTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import copy
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Variables/PackageVariableTests.py b/SCons/Variables/PackageVariableTests.py
index a7e6b0d..1e346f3 100644
--- a/SCons/Variables/PackageVariableTests.py
+++ b/SCons/Variables/PackageVariableTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Variables/PathVariableTests.py b/SCons/Variables/PathVariableTests.py
index 48ad0e0..5aa7156 100644
--- a/SCons/Variables/PathVariableTests.py
+++ b/SCons/Variables/PathVariableTests.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
-import sys
import unittest
import SCons.Errors
diff --git a/SCons/Variables/VariablesTests.py b/SCons/Variables/VariablesTests.py
index 93866e0..7127dc5 100644
--- a/SCons/Variables/VariablesTests.py
+++ b/SCons/Variables/VariablesTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import TestSCons
diff --git a/SCons/WarningsTests.py b/SCons/WarningsTests.py
index e4720eb..1664734 100644
--- a/SCons/WarningsTests.py
+++ b/SCons/WarningsTests.py
@@ -23,7 +23,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import unittest
import SCons.Warnings
diff --git a/SCons/compat/__init__.py b/SCons/compat/__init__.py
index 9fb4898..2784a6a 100644
--- a/SCons/compat/__init__.py
+++ b/SCons/compat/__init__.py
@@ -59,7 +59,6 @@ rest of our code will find our pre-loaded compatibility module.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import importlib
@@ -81,7 +80,6 @@ def rename_module(new, old):
# Default pickle protocol. Higher protocols are more efficient/featured
# but incompatible with older Python versions.
# Negative numbers choose the highest available protocol.
-import pickle
# Was pickle.HIGHEST_PROTOCOL
# Changed to 4 so that python 3.8's not incompatible with previous versions
diff --git a/test/AR/AR.py b/test/AR/AR.py
index 552b827..2b92ff4 100644
--- a/test/AR/AR.py
+++ b/test/AR/AR.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/AR/ARFLAGS.py b/test/AR/ARFLAGS.py
index 2aa1a14..21b3793 100644
--- a/test/AR/ARFLAGS.py
+++ b/test/AR/ARFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/AS/AS.py b/test/AS/AS.py
index 56a1498..0b6611d 100644
--- a/test/AS/AS.py
+++ b/test/AS/AS.py
@@ -29,8 +29,6 @@ Verify the ability to set the $AS construction variable to a different
assembler (a wrapper we create).
"""
-import os
-import sys
import TestSCons
diff --git a/test/AS/ASFLAGS.py b/test/AS/ASFLAGS.py
index 52f44af..4a1c162 100644
--- a/test/AS/ASFLAGS.py
+++ b/test/AS/ASFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/AS/ASPP.py b/test/AS/ASPP.py
index 64e1080..9c8f047 100644
--- a/test/AS/ASPP.py
+++ b/test/AS/ASPP.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
-import sys
import TestSCons
diff --git a/test/AS/ASPPFLAGS.py b/test/AS/ASPPFLAGS.py
index 5dd9a38..f7d7c5c 100644
--- a/test/AS/ASPPFLAGS.py
+++ b/test/AS/ASPPFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/Actions/append.py b/test/Actions/append.py
index 0a59c42..b5d4c3a 100644
--- a/test/Actions/append.py
+++ b/test/Actions/append.py
@@ -30,7 +30,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
import stat
-import sys
import TestSCons
_exe = TestSCons._exe
diff --git a/test/Actions/pre-post.py b/test/Actions/pre-post.py
index 4d22b07..358aa43 100644
--- a/test/Actions/pre-post.py
+++ b/test/Actions/pre-post.py
@@ -28,7 +28,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import stat
import TestSCons
diff --git a/test/Builder/errors.py b/test/Builder/errors.py
index bd7e100..375e052 100644
--- a/test/Builder/errors.py
+++ b/test/Builder/errors.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test the ability to catch Builder creation with poorly specified Actions.
"""
-import os.path
import TestSCons
diff --git a/test/CC/CCVERSION.py b/test/CC/CCVERSION.py
index 7e829f0..3ee601f 100644
--- a/test/CC/CCVERSION.py
+++ b/test/CC/CCVERSION.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/CC/SHCC.py b/test/CC/SHCC.py
index c756219..1c9f68d 100644
--- a/test/CC/SHCC.py
+++ b/test/CC/SHCC.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/CFILESUFFIX.py b/test/CFILESUFFIX.py
index 7af4fa4..0a62307 100644
--- a/test/CFILESUFFIX.py
+++ b/test/CFILESUFFIX.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that we can set CFILESUFFIX to arbitrary values.
"""
-import os
import TestSCons
diff --git a/test/CXX/CXX.py b/test/CXX/CXX.py
index abccf1e..4be4199 100644
--- a/test/CXX/CXX.py
+++ b/test/CXX/CXX.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/CXX/CXXFILESUFFIX.py b/test/CXX/CXXFILESUFFIX.py
index 48d727e..0ae5827 100644
--- a/test/CXX/CXXFILESUFFIX.py
+++ b/test/CXX/CXXFILESUFFIX.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/CacheDir/CacheDir_TryCompile.py b/test/CacheDir/CacheDir_TryCompile.py
index bb22835..dbea9be 100644
--- a/test/CacheDir/CacheDir_TryCompile.py
+++ b/test/CacheDir/CacheDir_TryCompile.py
@@ -32,7 +32,6 @@ could be bytes instead of a string which would fail when combining cache signatu
which ended up a mixture of bytes and strings.
"""
-import os
import TestSCons
diff --git a/test/CacheDir/NoCache.py b/test/CacheDir/NoCache.py
index 8ecfeb3..506a859 100644
--- a/test/CacheDir/NoCache.py
+++ b/test/CacheDir/NoCache.py
@@ -28,7 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that the NoCache environment method works.
"""
-import TestSCons, os.path
+import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/CacheDir/multiple-targets.py b/test/CacheDir/multiple-targets.py
index 99ab8da..d985ca0 100644
--- a/test/CacheDir/multiple-targets.py
+++ b/test/CacheDir/multiple-targets.py
@@ -28,8 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test that multiple target files get retrieved from a CacheDir correctly.
"""
-import os.path
-import shutil
import TestSCons
diff --git a/test/CacheDir/option--cd.py b/test/CacheDir/option--cd.py
index 1620858..3ea739c 100644
--- a/test/CacheDir/option--cd.py
+++ b/test/CacheDir/option--cd.py
@@ -29,8 +29,6 @@ Test the --cache-disable option when retrieving derived files from a
CacheDir.
"""
-import os.path
-import shutil
import TestSCons
diff --git a/test/CacheDir/option--cr.py b/test/CacheDir/option--cr.py
index b7696c5..0395876 100644
--- a/test/CacheDir/option--cr.py
+++ b/test/CacheDir/option--cr.py
@@ -29,8 +29,6 @@ Test the --cache-readonly option when retrieving derived files from a
CacheDir. It should retrieve as normal but not update files.
"""
-import os.path
-import shutil
import TestSCons
diff --git a/test/CacheDir/option--cs.py b/test/CacheDir/option--cs.py
index feb89bd..a2b09ed 100644
--- a/test/CacheDir/option--cs.py
+++ b/test/CacheDir/option--cs.py
@@ -29,8 +29,6 @@ Test printing build actions when using the --cache-show option and
retrieving derived files from a CacheDir.
"""
-import os.path
-import shutil
import TestSCons
diff --git a/test/CacheDir/readonly-cache.py b/test/CacheDir/readonly-cache.py
index 63cfd22..4aad0ee 100755
--- a/test/CacheDir/readonly-cache.py
+++ b/test/CacheDir/readonly-cache.py
@@ -32,7 +32,6 @@ import glob
import os
import TestSCons
import time
-from stat import *
test = TestSCons.TestSCons()
diff --git a/test/CacheDir/scanner-target.py b/test/CacheDir/scanner-target.py
index 249e587..202910b 100644
--- a/test/CacheDir/scanner-target.py
+++ b/test/CacheDir/scanner-target.py
@@ -31,8 +31,6 @@ to push the file to the CacheDir after the build signature had already
been cleared (as a sign that the built file should now be rescanned).
"""
-import os.path
-import shutil
import TestSCons
diff --git a/test/Clean/Option.py b/test/Clean/Option.py
index 5795ff2..c63dff7 100644
--- a/test/Clean/Option.py
+++ b/test/Clean/Option.py
@@ -29,7 +29,6 @@ Verify that {Set,Get}Option('clean') works correctly to control
cleaning behavior.
"""
-import os
import TestSCons
diff --git a/test/CommandGenerator.py b/test/CommandGenerator.py
index b8155e7..5cae4a6 100644
--- a/test/CommandGenerator.py
+++ b/test/CommandGenerator.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/Configure/VariantDir2.py b/test/Configure/VariantDir2.py
index ffe6525..98f4ccd 100644
--- a/test/Configure/VariantDir2.py
+++ b/test/Configure/VariantDir2.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that Configure contexts work with SConstruct/SConscript structure
"""
-import os
import TestSCons
diff --git a/test/Configure/config-h.py b/test/Configure/config-h.py
index 0331b24..f617d92 100644
--- a/test/Configure/config-h.py
+++ b/test/Configure/config-h.py
@@ -27,7 +27,6 @@ Verify creation of a config.h file from a Configure context.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import re
import TestSCons
diff --git a/test/Copy-Symlinks.py b/test/Copy-Symlinks.py
index eab38e3..d2f5f4b 100644
--- a/test/Copy-Symlinks.py
+++ b/test/Copy-Symlinks.py
@@ -29,8 +29,6 @@ Verify that the Copy() Action symlink soft-copy support works.
"""
import os
-import stat
-import sys
import TestSCons
import SCons.Defaults
diff --git a/test/D/Issues/2994/Common/D_changed_DFLAGS_not_rebuilding.py b/test/D/Issues/2994/Common/D_changed_DFLAGS_not_rebuilding.py
index b58227d..66d84c8 100644
--- a/test/D/Issues/2994/Common/D_changed_DFLAGS_not_rebuilding.py
+++ b/test/D/Issues/2994/Common/D_changed_DFLAGS_not_rebuilding.py
@@ -30,7 +30,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
-from os.path import abspath, dirname, join
+from os.path import abspath, dirname
import sys
sys.path.insert(1, abspath(dirname(__file__) + '/../../../Support'))
diff --git a/test/D/MixedDAndC/Common/common.py b/test/D/MixedDAndC/Common/common.py
index 852e2e2..2de1304 100644
--- a/test/D/MixedDAndC/Common/common.py
+++ b/test/D/MixedDAndC/Common/common.py
@@ -30,7 +30,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
from os.path import abspath, dirname
-from platform import architecture
import sys
sys.path.insert(1, abspath(dirname(__file__) + '/../../Support'))
diff --git a/test/Decider/MD5-winonly-firstbuild.py b/test/Decider/MD5-winonly-firstbuild.py
index 87f7999..beabce3 100644
--- a/test/Decider/MD5-winonly-firstbuild.py
+++ b/test/Decider/MD5-winonly-firstbuild.py
@@ -29,8 +29,6 @@ Test but which only shows on windows when one generated file depends on another
In this case flex and yacc are an example.
"""
-import os
-import stat
import TestSCons
from TestCmd import IS_WINDOWS
diff --git a/test/Dir/PyPackageDir/PyPackageDir.py b/test/Dir/PyPackageDir/PyPackageDir.py
index b215c7b..beb256b 100644
--- a/test/Dir/PyPackageDir/PyPackageDir.py
+++ b/test/Dir/PyPackageDir/PyPackageDir.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/Docbook/basedir/htmlchunked/htmlchunked_cmd.py b/test/Docbook/basedir/htmlchunked/htmlchunked_cmd.py
index 3ad6369..e603232 100644
--- a/test/Docbook/basedir/htmlchunked/htmlchunked_cmd.py
+++ b/test/Docbook/basedir/htmlchunked/htmlchunked_cmd.py
@@ -28,7 +28,6 @@ the xsltproc executable, if it exists.
"""
import os
-import sys
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/Docbook/basedir/htmlhelp/htmlhelp_cmd.py b/test/Docbook/basedir/htmlhelp/htmlhelp_cmd.py
index 2b004c6..ebefb92 100644
--- a/test/Docbook/basedir/htmlhelp/htmlhelp_cmd.py
+++ b/test/Docbook/basedir/htmlhelp/htmlhelp_cmd.py
@@ -28,7 +28,6 @@ the xsltproc executable, if it exists.
"""
import os
-import sys
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/Docbook/basedir/slideshtml/slideshtml_cmd.py b/test/Docbook/basedir/slideshtml/slideshtml_cmd.py
index 901d94e..b0f1f25 100644
--- a/test/Docbook/basedir/slideshtml/slideshtml_cmd.py
+++ b/test/Docbook/basedir/slideshtml/slideshtml_cmd.py
@@ -28,7 +28,6 @@ the xsltproc executable, if it exists.
"""
import os
-import sys
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/Docbook/basic/htmlchunked/htmlchunked_cmd.py b/test/Docbook/basic/htmlchunked/htmlchunked_cmd.py
index 6b79102..9715c0f 100644
--- a/test/Docbook/basic/htmlchunked/htmlchunked_cmd.py
+++ b/test/Docbook/basic/htmlchunked/htmlchunked_cmd.py
@@ -27,7 +27,6 @@ Test the chunked HTML builder while using
the xsltproc executable, if it exists.
"""
-import os
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/Docbook/basic/slideshtml/slideshtml_cmd.py b/test/Docbook/basic/slideshtml/slideshtml_cmd.py
index 7ebc8d4..9c8097b 100644
--- a/test/Docbook/basic/slideshtml/slideshtml_cmd.py
+++ b/test/Docbook/basic/slideshtml/slideshtml_cmd.py
@@ -28,7 +28,6 @@ the xsltproc executable, if it exists.
"""
import os
-import sys
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/Errors/execute-a-directory.py b/test/Errors/execute-a-directory.py
index 8b6d13b..ff50620 100644
--- a/test/Errors/execute-a-directory.py
+++ b/test/Errors/execute-a-directory.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import sys
import TestSCons
diff --git a/test/Errors/non-executable-file.py b/test/Errors/non-executable-file.py
index 64c75c6..98d4721 100644
--- a/test/Errors/non-executable-file.py
+++ b/test/Errors/non-executable-file.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import sys
import TestSCons
diff --git a/test/Fortran/F03.py b/test/Fortran/F03.py
index 989d878..ce56cc3 100644
--- a/test/Fortran/F03.py
+++ b/test/Fortran/F03.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F03FILESUFFIXES.py b/test/Fortran/F03FILESUFFIXES.py
index 5620a2d..49c9c66 100644
--- a/test/Fortran/F03FILESUFFIXES.py
+++ b/test/Fortran/F03FILESUFFIXES.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F03FILESUFFIXES2.py b/test/Fortran/F03FILESUFFIXES2.py
index 6073aab..6512341 100644
--- a/test/Fortran/F03FILESUFFIXES2.py
+++ b/test/Fortran/F03FILESUFFIXES2.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F03FLAGS.py b/test/Fortran/F03FLAGS.py
index 54b8083..63d1fcb 100644
--- a/test/Fortran/F03FLAGS.py
+++ b/test/Fortran/F03FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F08.py b/test/Fortran/F08.py
index f60509c..eb381ee 100644
--- a/test/Fortran/F08.py
+++ b/test/Fortran/F08.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F08FILESUFFIXES.py b/test/Fortran/F08FILESUFFIXES.py
index 989d685..392ff64 100644
--- a/test/Fortran/F08FILESUFFIXES.py
+++ b/test/Fortran/F08FILESUFFIXES.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F08FILESUFFIXES2.py b/test/Fortran/F08FILESUFFIXES2.py
index 0d99225..babb8e6 100644
--- a/test/Fortran/F08FILESUFFIXES2.py
+++ b/test/Fortran/F08FILESUFFIXES2.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F08FLAGS.py b/test/Fortran/F08FLAGS.py
index 015fb0b..81ae441 100644
--- a/test/Fortran/F08FLAGS.py
+++ b/test/Fortran/F08FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F77.py b/test/Fortran/F77.py
index ed5d33f..c43fb3e 100644
--- a/test/Fortran/F77.py
+++ b/test/Fortran/F77.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F77FILESUFFIXES.py b/test/Fortran/F77FILESUFFIXES.py
index c289e10..8c7aec8 100644
--- a/test/Fortran/F77FILESUFFIXES.py
+++ b/test/Fortran/F77FILESUFFIXES.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F77FILESUFFIXES2.py b/test/Fortran/F77FILESUFFIXES2.py
index 1f26012..86cd931 100644
--- a/test/Fortran/F77FILESUFFIXES2.py
+++ b/test/Fortran/F77FILESUFFIXES2.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F77FLAGS.py b/test/Fortran/F77FLAGS.py
index caf291d..01bf33b 100644
--- a/test/Fortran/F77FLAGS.py
+++ b/test/Fortran/F77FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F90.py b/test/Fortran/F90.py
index d76af07..404f883 100644
--- a/test/Fortran/F90.py
+++ b/test/Fortran/F90.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F90FILESUFFIXES.py b/test/Fortran/F90FILESUFFIXES.py
index d91c4c8..e376f3c 100644
--- a/test/Fortran/F90FILESUFFIXES.py
+++ b/test/Fortran/F90FILESUFFIXES.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F90FILESUFFIXES2.py b/test/Fortran/F90FILESUFFIXES2.py
index 3efc52c..e01425f 100644
--- a/test/Fortran/F90FILESUFFIXES2.py
+++ b/test/Fortran/F90FILESUFFIXES2.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F90FLAGS.py b/test/Fortran/F90FLAGS.py
index f748e5d..5a469e9 100644
--- a/test/Fortran/F90FLAGS.py
+++ b/test/Fortran/F90FLAGS.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F95.py b/test/Fortran/F95.py
index 8e6d0b9..7b4c97a 100644
--- a/test/Fortran/F95.py
+++ b/test/Fortran/F95.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F95FILESUFFIXES.py b/test/Fortran/F95FILESUFFIXES.py
index 427c881..710f838 100644
--- a/test/Fortran/F95FILESUFFIXES.py
+++ b/test/Fortran/F95FILESUFFIXES.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F95FILESUFFIXES2.py b/test/Fortran/F95FILESUFFIXES2.py
index a0ee1cf..2f8bb17 100644
--- a/test/Fortran/F95FILESUFFIXES2.py
+++ b/test/Fortran/F95FILESUFFIXES2.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/F95FLAGS.py b/test/Fortran/F95FLAGS.py
index 203aee1..2853cc9 100644
--- a/test/Fortran/F95FLAGS.py
+++ b/test/Fortran/F95FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/FORTRAN.py b/test/Fortran/FORTRAN.py
index 721d48f..62d7065 100644
--- a/test/Fortran/FORTRAN.py
+++ b/test/Fortran/FORTRAN.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/FORTRANFILESUFFIXES.py b/test/Fortran/FORTRANFILESUFFIXES.py
index ec659a1..e58b971 100644
--- a/test/Fortran/FORTRANFILESUFFIXES.py
+++ b/test/Fortran/FORTRANFILESUFFIXES.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/FORTRANFILESUFFIXES2.py b/test/Fortran/FORTRANFILESUFFIXES2.py
index 6dda07d..a57dd2a 100644
--- a/test/Fortran/FORTRANFILESUFFIXES2.py
+++ b/test/Fortran/FORTRANFILESUFFIXES2.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/FORTRANFLAGS.py b/test/Fortran/FORTRANFLAGS.py
index 316f67c..218c95f 100644
--- a/test/Fortran/FORTRANFLAGS.py
+++ b/test/Fortran/FORTRANFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/FORTRANPPFILESUFFIXES.py b/test/Fortran/FORTRANPPFILESUFFIXES.py
index 6b3b3d8..2c10b10 100644
--- a/test/Fortran/FORTRANPPFILESUFFIXES.py
+++ b/test/Fortran/FORTRANPPFILESUFFIXES.py
@@ -25,9 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
-import string
-import sys
import TestSCons
diff --git a/test/Fortran/SHF03.py b/test/Fortran/SHF03.py
index 0ab2cc9..1c3fb1b 100644
--- a/test/Fortran/SHF03.py
+++ b/test/Fortran/SHF03.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF08.py b/test/Fortran/SHF08.py
index 8147b79..49a4c47 100644
--- a/test/Fortran/SHF08.py
+++ b/test/Fortran/SHF08.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF77.py b/test/Fortran/SHF77.py
index 1b0e180..4358533 100644
--- a/test/Fortran/SHF77.py
+++ b/test/Fortran/SHF77.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF77FLAGS.py b/test/Fortran/SHF77FLAGS.py
index 19d40b6..3a7e6b2 100644
--- a/test/Fortran/SHF77FLAGS.py
+++ b/test/Fortran/SHF77FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF90.py b/test/Fortran/SHF90.py
index 1524bf3..057f98c 100644
--- a/test/Fortran/SHF90.py
+++ b/test/Fortran/SHF90.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF90FLAGS.py b/test/Fortran/SHF90FLAGS.py
index 947bf4b..900acbc 100644
--- a/test/Fortran/SHF90FLAGS.py
+++ b/test/Fortran/SHF90FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF95.py b/test/Fortran/SHF95.py
index 27d9a76..3b1f4fb 100644
--- a/test/Fortran/SHF95.py
+++ b/test/Fortran/SHF95.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHF95FLAGS.py b/test/Fortran/SHF95FLAGS.py
index d1fbe3f..56744d6 100644
--- a/test/Fortran/SHF95FLAGS.py
+++ b/test/Fortran/SHF95FLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHFORTRAN.py b/test/Fortran/SHFORTRAN.py
index f4850d7..a8806e7 100644
--- a/test/Fortran/SHFORTRAN.py
+++ b/test/Fortran/SHFORTRAN.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Fortran/SHFORTRANFLAGS.py b/test/Fortran/SHFORTRANFLAGS.py
index ac2abd8..6a4692b 100644
--- a/test/Fortran/SHFORTRANFLAGS.py
+++ b/test/Fortran/SHFORTRANFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Install/directories.py b/test/Install/directories.py
index 3ebc713..e980936 100644
--- a/test/Install/directories.py
+++ b/test/Install/directories.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test using Install() on directories.
"""
-import os.path
import TestSCons
diff --git a/test/Install/non-ascii-name.py b/test/Install/non-ascii-name.py
index 462040d..7e25743 100644
--- a/test/Install/non-ascii-name.py
+++ b/test/Install/non-ascii-name.py
@@ -29,7 +29,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that the Install() Builder works
"""
-import os.path
import TestSCons
diff --git a/test/Java/JAR.py b/test/Java/JAR.py
index d5425af..2cd6012 100644
--- a/test/Java/JAR.py
+++ b/test/Java/JAR.py
@@ -26,7 +26,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
import TestSCons
-import sys
_python_ = TestSCons._python_
diff --git a/test/Java/JARCHDIR.py b/test/Java/JARCHDIR.py
index 59bf082..24a8597 100644
--- a/test/Java/JARCHDIR.py
+++ b/test/Java/JARCHDIR.py
@@ -33,7 +33,6 @@ Includes logic to make sure that expansions of $JARCHDIR that include
${TARGET} or ${SOURCE} work.
"""
-import os
import TestSCons
diff --git a/test/Java/JARFLAGS.py b/test/Java/JARFLAGS.py
index 6983bf7..fc6e55e 100644
--- a/test/Java/JARFLAGS.py
+++ b/test/Java/JARFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/Java/jar_not_in_PATH.py b/test/Java/jar_not_in_PATH.py
index 9a716c5..d69f9c3 100644
--- a/test/Java/jar_not_in_PATH.py
+++ b/test/Java/jar_not_in_PATH.py
@@ -29,7 +29,6 @@ Ensures that the Tool gets initialized, even when jar is not directly
found via the PATH variable (issue #2730).
"""
-import os
import TestSCons
diff --git a/test/Java/nested-classes.py b/test/Java/nested-classes.py
index a764054..0208eb6 100644
--- a/test/Java/nested-classes.py
+++ b/test/Java/nested-classes.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test Java compilation with inner and anonymous classes (Issue 2087).
"""
-import os
import TestSCons
diff --git a/test/Java/swig-dependencies.py b/test/Java/swig-dependencies.py
index a3af9ec..c1821f8 100644
--- a/test/Java/swig-dependencies.py
+++ b/test/Java/swig-dependencies.py
@@ -143,7 +143,6 @@ except:
# the test framework
test.skip_test('Throwing no result for this test because of bug ' +
'related here: https://github.com/SCons/scons/issues/2907\n')
- pass
#test.must_exist(['java', 'classes', 'foopack', 'foopack.class'])
#test.must_exist(['java', 'classes', 'foopack', 'foopackJNI.class'])
test.must_exist(['java', 'classes', 'foopack.class'])
diff --git a/test/LEX/LEX.py b/test/LEX/LEX.py
index a739bfe..79d8359 100644
--- a/test/LEX/LEX.py
+++ b/test/LEX/LEX.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/LEX/LEXFLAGS.py b/test/LEX/LEXFLAGS.py
index 994834e..2cebca7 100644
--- a/test/LEX/LEXFLAGS.py
+++ b/test/LEX/LEXFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/LINK/LDMODULEVERSIONFLAGS.py b/test/LINK/LDMODULEVERSIONFLAGS.py
index d8f280a..509bde8 100644
--- a/test/LINK/LDMODULEVERSIONFLAGS.py
+++ b/test/LINK/LDMODULEVERSIONFLAGS.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
-import re
import TestSCons
import SCons.Platform
diff --git a/test/LINK/LINK.py b/test/LINK/LINK.py
index 6c99134..f278ac0 100644
--- a/test/LINK/LINK.py
+++ b/test/LINK/LINK.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/LINK/LINKFLAGS.py b/test/LINK/LINKFLAGS.py
index 749e369..d3b675e 100644
--- a/test/LINK/LINKFLAGS.py
+++ b/test/LINK/LINKFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/LINK/SHLIBVERSIONFLAGS.py b/test/LINK/SHLIBVERSIONFLAGS.py
index 6cf7290..d2e271c 100644
--- a/test/LINK/SHLIBVERSIONFLAGS.py
+++ b/test/LINK/SHLIBVERSIONFLAGS.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
-import re
import TestSCons
import SCons.Platform
diff --git a/test/LINK/SHLINK.py b/test/LINK/SHLINK.py
index 9d406fc..26d88fa 100644
--- a/test/LINK/SHLINK.py
+++ b/test/LINK/SHLINK.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/LINK/SHLINKFLAGS.py b/test/LINK/SHLINKFLAGS.py
index af5bdbb..a4ae652 100644
--- a/test/LINK/SHLINKFLAGS.py
+++ b/test/LINK/SHLINKFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/LINK/VersionedLib.py b/test/LINK/VersionedLib.py
index 104f696..5f74f92 100644
--- a/test/LINK/VersionedLib.py
+++ b/test/LINK/VersionedLib.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import sys
import TestSCons
import SCons.Platform
diff --git a/test/Libs/SharedLibrary-update-deps.py b/test/Libs/SharedLibrary-update-deps.py
index 3abce83..922d580 100644
--- a/test/Libs/SharedLibrary-update-deps.py
+++ b/test/Libs/SharedLibrary-update-deps.py
@@ -30,7 +30,6 @@ This is https://github.com/SCons/scons/issues/2903
"""
import sys
-import os.path
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/MSVC/PCHSTOP-errors.py b/test/MSVC/PCHSTOP-errors.py
index aa14a3f..a359135 100644
--- a/test/MSVC/PCHSTOP-errors.py
+++ b/test/MSVC/PCHSTOP-errors.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
# Test error reporting
"""
-import re
import TestSCons
diff --git a/test/MSVC/mssdk.py b/test/MSVC/mssdk.py
index 9890d48..88dd5d1 100644
--- a/test/MSVC/mssdk.py
+++ b/test/MSVC/mssdk.py
@@ -27,7 +27,6 @@ Simple test to make sure mssdk works.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import time
import TestSCons
diff --git a/test/MSVC/pch-basics.py b/test/MSVC/pch-basics.py
index ebee0da..e2b40f1 100644
--- a/test/MSVC/pch-basics.py
+++ b/test/MSVC/pch-basics.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify PCH works to build a simple exe and a simple dll.
"""
-import time
import TestSCons
diff --git a/test/MSVC/pch-spaces-subdir.py b/test/MSVC/pch-spaces-subdir.py
index 65595fc..f00fac1 100644
--- a/test/MSVC/pch-spaces-subdir.py
+++ b/test/MSVC/pch-spaces-subdir.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify PCH works if variant dir has spaces in its name
"""
-import time
import TestSCons
diff --git a/test/MSVS/common-prefix.py b/test/MSVS/common-prefix.py
index 7079661..7bba783 100644
--- a/test/MSVS/common-prefix.py
+++ b/test/MSVS/common-prefix.py
@@ -30,7 +30,6 @@ Test that we can generate Visual Studio 8.0 project (.vcproj) and
solution (.sln) files that look correct.
"""
-import os
import sys
import TestSConsMSVS
diff --git a/test/MSVS/runfile.py b/test/MSVS/runfile.py
index 631c919..1cc4720 100644
--- a/test/MSVS/runfile.py
+++ b/test/MSVS/runfile.py
@@ -30,7 +30,6 @@ Test that we can generate Visual Studio 8.0 project (.vcproj) and
solution (.sln) files that look correct.
"""
-import os
import sys
import TestSConsMSVS
diff --git a/test/MSVS/vs-6.0-exec.py b/test/MSVS/vs-6.0-exec.py
index ab70872..40f69c0 100644
--- a/test/MSVS/vs-6.0-exec.py
+++ b/test/MSVS/vs-6.0-exec.py
@@ -29,7 +29,6 @@ Test that we can actually build a simple program using our generated
Visual Studio 6 project (.dsp) and solution (.dsw) files.
"""
-import os
import sys
import TestSConsMSVS
diff --git a/test/MSVS/vs-7.0-exec.py b/test/MSVS/vs-7.0-exec.py
index 3c41aa5..a6235a7 100644
--- a/test/MSVS/vs-7.0-exec.py
+++ b/test/MSVS/vs-7.0-exec.py
@@ -29,7 +29,6 @@ Test that we can actually build a simple program using our generated
Visual Studio 7.0 project (.vcproj) and solution (.sln) files.
"""
-import os
import sys
import TestSConsMSVS
diff --git a/test/MSVS/vs-7.0-scc-files.py b/test/MSVS/vs-7.0-scc-files.py
index 4d90a92..f1f77db 100644
--- a/test/MSVS/vs-7.0-scc-files.py
+++ b/test/MSVS/vs-7.0-scc-files.py
@@ -29,7 +29,6 @@ Test that we can generate Visual Studio 7.0 project (.vcproj) and
solution (.sln) files that contain SCC information and look correct.
"""
-import os
import TestSConsMSVS
diff --git a/test/MSVS/vs-7.0-scc-legacy-files.py b/test/MSVS/vs-7.0-scc-legacy-files.py
index e87441b..a180b8a 100644
--- a/test/MSVS/vs-7.0-scc-legacy-files.py
+++ b/test/MSVS/vs-7.0-scc-legacy-files.py
@@ -29,7 +29,6 @@ Test that we can generate Visual Studio 7.0 project (.vcproj) and
solution (.sln) files that contain SCC information and look correct.
"""
-import os
import TestSConsMSVS
diff --git a/test/MSVS/vs-7.1-exec.py b/test/MSVS/vs-7.1-exec.py
index f66b92d..7bb3055 100644
--- a/test/MSVS/vs-7.1-exec.py
+++ b/test/MSVS/vs-7.1-exec.py
@@ -29,7 +29,6 @@ Test that we can actually build a simple program using our generated
Visual Studio 7.1 project (.vcproj) and solution (.sln) files
"""
-import os
import sys
import TestSConsMSVS
diff --git a/test/MSVS/vs-7.1-scc-files.py b/test/MSVS/vs-7.1-scc-files.py
index 8404422..0b42930 100644
--- a/test/MSVS/vs-7.1-scc-files.py
+++ b/test/MSVS/vs-7.1-scc-files.py
@@ -29,7 +29,6 @@ Test that we can generate Visual Studio 7.1 project (.vcproj) and
solution (.sln) files that contain SCC information and look correct.
"""
-import os
import TestSConsMSVS
diff --git a/test/MSVS/vs-7.1-scc-legacy-files.py b/test/MSVS/vs-7.1-scc-legacy-files.py
index f80c965..bb184d6 100644
--- a/test/MSVS/vs-7.1-scc-legacy-files.py
+++ b/test/MSVS/vs-7.1-scc-legacy-files.py
@@ -29,7 +29,6 @@ Test that we can generate Visual Studio 7.1 project (.vcproj) and
solution (.sln) files that contain SCC information and look correct.
"""
-import os
import TestSConsMSVS
diff --git a/test/MinGW/mingw_uses_comstr_issue_2799.py b/test/MinGW/mingw_uses_comstr_issue_2799.py
index cc92446..fc96ad4 100644
--- a/test/MinGW/mingw_uses_comstr_issue_2799.py
+++ b/test/MinGW/mingw_uses_comstr_issue_2799.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test that mingw respects SHLINKCOMSTR, SHCCCOMSTR, and LDMODULECOMSTR
"""
-import sys
import TestSCons
_python_ = TestSCons._python_
diff --git a/test/Progress/TARGET.py b/test/Progress/TARGET.py
index bbe2538..9535390 100644
--- a/test/Progress/TARGET.py
+++ b/test/Progress/TARGET.py
@@ -29,7 +29,6 @@ Verify substition of the $TARGET string in progress output, including
overwriting it by setting the overwrite= keyword argument.
"""
-import os
import TestSCons
diff --git a/test/Progress/spinner.py b/test/Progress/spinner.py
index ff88841..f9be6e9 100644
--- a/test/Progress/spinner.py
+++ b/test/Progress/spinner.py
@@ -29,7 +29,6 @@ Verify output when a Progress() call is initialized with the list
that represents a canonical "spinner" on the output.
"""
-import os
import TestSCons
diff --git a/test/Repository/Install.py b/test/Repository/Install.py
index 75052e7..9c1259a 100644
--- a/test/Repository/Install.py
+++ b/test/Repository/Install.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/Repository/InstallAs.py b/test/Repository/InstallAs.py
index d717254..c153771 100644
--- a/test/Repository/InstallAs.py
+++ b/test/Repository/InstallAs.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/Repository/M4.py b/test/Repository/M4.py
index 8fa91ab..2e40468 100644
--- a/test/Repository/M4.py
+++ b/test/Repository/M4.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test that $M4 and $M4FLAGS work with repositories.
"""
-import os
import TestSCons
diff --git a/test/SConsignFile/default.py b/test/SConsignFile/default.py
index 62ac006..ed1ed56 100644
--- a/test/SConsignFile/default.py
+++ b/test/SConsignFile/default.py
@@ -29,7 +29,6 @@ Verify the default behavior of SConsignFile(), called with no arguments.
"""
import TestSCons
-import os.path
_python_ = TestSCons._python_
diff --git a/test/SConsignFile/explicit-file.py b/test/SConsignFile/explicit-file.py
index 7583bdc..afb2dbd 100644
--- a/test/SConsignFile/explicit-file.py
+++ b/test/SConsignFile/explicit-file.py
@@ -29,7 +29,6 @@ Verify the default behavior of SConsignFile(), called with no arguments.
"""
import TestSCons
-import os.path
_python_ = TestSCons._python_
diff --git a/test/SConsignFile/use-dumbdbm.py b/test/SConsignFile/use-dumbdbm.py
index 36ba18b..22b0bff 100644
--- a/test/SConsignFile/use-dumbdbm.py
+++ b/test/SConsignFile/use-dumbdbm.py
@@ -35,14 +35,10 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
try:
- import dumbdbm
- use_dbm = 'dumbdbm'
+ import dbm.dumb
+ use_dbm='dbm.dumb'
except ImportError:
- try:
- import dbm.dumb
- use_dbm='dbm.dumb'
- except ImportError:
- test.skip_test('No dumbdbm or dbm.dumb in this version of Python; skipping test.\n')
+ test.skip_test('No dbm.dumb in this version of Python; skipping test.\n')
test.subdir('subdir')
diff --git a/test/SConsignFile/use-gdbm.py b/test/SConsignFile/use-gdbm.py
index 12a2e8b..461a482 100644
--- a/test/SConsignFile/use-gdbm.py
+++ b/test/SConsignFile/use-gdbm.py
@@ -35,14 +35,10 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
try:
- import gdbm
- use_dbm = "gdbm"
+ import dbm.gnu
+ use_dbm = "dbm.gnu"
except ImportError:
- try:
- import dbm.gnu
- use_dbm = "dbm.gnu"
- except ImportError:
- test.skip_test('No GNU dbm in this version of Python; skipping test.\n')
+ test.skip_test('No GNU dbm in this version of Python; skipping test.\n')
test.subdir('subdir')
diff --git a/test/SWIG/SWIGFLAGS.py b/test/SWIG/SWIGFLAGS.py
index cb91699..70e16a6 100644
--- a/test/SWIG/SWIGFLAGS.py
+++ b/test/SWIG/SWIGFLAGS.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that we can use ${SOURCE} expansions in $SWIGFLAGS.
"""
-import sys
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/SWIG/live.py b/test/SWIG/live.py
index e7b2602..3d46b74 100644
--- a/test/SWIG/live.py
+++ b/test/SWIG/live.py
@@ -27,7 +27,6 @@ Test SWIG behavior with a live, installed SWIG.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/Scanner/Scanner.py b/test/Scanner/Scanner.py
index 7e39134..4889d0f 100644
--- a/test/Scanner/Scanner.py
+++ b/test/Scanner/Scanner.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
-import os
_python_ = TestSCons._python_
diff --git a/test/TEX/generated_files.py b/test/TEX/generated_files.py
index 9bafc9b..418d99b 100644
--- a/test/TEX/generated_files.py
+++ b/test/TEX/generated_files.py
@@ -33,7 +33,6 @@ Test courtesy Rob Managan.
"""
import TestSCons
-import os
test = TestSCons.TestSCons()
diff --git a/test/TEX/synctex.py b/test/TEX/synctex.py
index 385a173..c9552d5 100644
--- a/test/TEX/synctex.py
+++ b/test/TEX/synctex.py
@@ -31,7 +31,6 @@ be aware of the created synctex.gz file.
Test configuration contributed by Robert Managan.
"""
-import os
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/TempFileMunge/TEMPFILEPREFIX.py b/test/TempFileMunge/TEMPFILEPREFIX.py
index ac2ae46..62ac814 100644
--- a/test/TempFileMunge/TEMPFILEPREFIX.py
+++ b/test/TempFileMunge/TEMPFILEPREFIX.py
@@ -25,8 +25,6 @@ it to appear at the front of name of the generated tempfile
used for long command lines.
"""
-import os
-import stat
import TestSCons
diff --git a/test/TempFileMunge/TEMPFILESUFFIX.py b/test/TempFileMunge/TEMPFILESUFFIX.py
index a19317d..bd4cf09 100644
--- a/test/TempFileMunge/TEMPFILESUFFIX.py
+++ b/test/TempFileMunge/TEMPFILESUFFIX.py
@@ -25,8 +25,6 @@ it to appear at the end of name of the generated tempfile
used for long command lines.
"""
-import os
-import stat
import TestSCons
diff --git a/test/Variables/BoolVariable.py b/test/Variables/BoolVariable.py
index d259984..eaf496a 100644
--- a/test/Variables/BoolVariable.py
+++ b/test/Variables/BoolVariable.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test the BoolVariable canned Variable type.
"""
-import os
import TestSCons
diff --git a/test/Variables/EnumVariable.py b/test/Variables/EnumVariable.py
index cf35b9b..14a8bf3 100644
--- a/test/Variables/EnumVariable.py
+++ b/test/Variables/EnumVariable.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test the EnumVariable canned Variable type.
"""
-import os.path
import TestSCons
diff --git a/test/Variables/PackageVariable.py b/test/Variables/PackageVariable.py
index b3fd10a..eb14383 100644
--- a/test/Variables/PackageVariable.py
+++ b/test/Variables/PackageVariable.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test the PackageVariable canned Variable type.
"""
-import os
import TestSCons
diff --git a/test/YACC/YACCFLAGS.py b/test/YACC/YACCFLAGS.py
index b3f86fe..1ab8c0d 100644
--- a/test/YACC/YACCFLAGS.py
+++ b/test/YACC/YACCFLAGS.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import sys
import TestSCons
diff --git a/test/YACC/live.py b/test/YACC/live.py
index 4567dba..6314e6c 100644
--- a/test/YACC/live.py
+++ b/test/YACC/live.py
@@ -29,8 +29,6 @@ Test YACC and YACCFLAGS with a live yacc compiler.
"""
import TestSCons
-import sys
-import os
_exe = TestSCons._exe
_python_ = TestSCons._python_
diff --git a/test/ZIP/ZIPROOT.py b/test/ZIP/ZIPROOT.py
index f3e4496..24e82eb 100644
--- a/test/ZIP/ZIPROOT.py
+++ b/test/ZIP/ZIPROOT.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
-import stat
import TestSCons
diff --git a/test/emitter.py b/test/emitter.py
index 7712d3a..d2a8b67 100644
--- a/test/emitter.py
+++ b/test/emitter.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
-import os
test = TestSCons.TestSCons()
diff --git a/test/exitfns.py b/test/exitfns.py
index fca44b8..c303a8e 100644
--- a/test/exitfns.py
+++ b/test/exitfns.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
-import os
test = TestSCons.TestSCons()
# also exclude these tests since it overides the exit function which doesnt work with coverage
diff --git a/test/gettext/MOFiles/UserExamples.py b/test/gettext/MOFiles/UserExamples.py
index 1b78268..5cc3037 100644
--- a/test/gettext/MOFiles/UserExamples.py
+++ b/test/gettext/MOFiles/UserExamples.py
@@ -30,7 +30,6 @@ Make sure, that the examples given in user guide all work.
"""
import TestSCons
-import os
test = TestSCons.TestSCons()
diff --git a/test/gettext/POUpdate/UserExamples.py b/test/gettext/POUpdate/UserExamples.py
index 5f3e6c7..be38996 100644
--- a/test/gettext/POUpdate/UserExamples.py
+++ b/test/gettext/POUpdate/UserExamples.py
@@ -29,7 +29,6 @@ Make sure, that the examples given in user guide all work.
"""
import TestSCons
-import os
test = TestSCons.TestSCons()
diff --git a/test/gettext/Translate/MultiCatalog.py b/test/gettext/Translate/MultiCatalog.py
index 1a5708c..e8c2b97 100644
--- a/test/gettext/Translate/MultiCatalog.py
+++ b/test/gettext/Translate/MultiCatalog.py
@@ -42,7 +42,6 @@ files correctly.
# replicate the bug.
import TestSCons
-from os import path
test = TestSCons.TestSCons()
diff --git a/test/ignore-command.py b/test/ignore-command.py
index d5c18a5..3833e61 100644
--- a/test/ignore-command.py
+++ b/test/ignore-command.py
@@ -28,7 +28,6 @@ Test use of a preceding - to ignore the return value from a command.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/import.py b/test/import.py
index df64a1e..55a40cc 100644
--- a/test/import.py
+++ b/test/import.py
@@ -27,7 +27,6 @@ modules directly.
import os
import re
-import sys
# must do this here, since TestSCons will chdir
tooldir = os.path.join(os.getcwd(), 'SCons', 'Tool')
diff --git a/test/multiline.py b/test/multiline.py
index c2fabf8..b910b69 100644
--- a/test/multiline.py
+++ b/test/multiline.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/no-arguments.py b/test/no-arguments.py
index 8925c48..5ed66ab 100644
--- a/test/no-arguments.py
+++ b/test/no-arguments.py
@@ -30,7 +30,6 @@ is no Default() in the SConstruct file and there are no command-line
arguments, or a null command-line argument.
"""
-import os.path
import TestSCons
diff --git a/test/option--random.py b/test/option--random.py
index c25ec12..1dafca4 100644
--- a/test/option--random.py
+++ b/test/option--random.py
@@ -27,7 +27,6 @@ Verify that we build correctly using the --random option.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/option--tree.py b/test/option--tree.py
index 290f1d4..5192ac0 100644
--- a/test/option--tree.py
+++ b/test/option--tree.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import sys
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/option-k.py b/test/option-k.py
index 4f4c86b..d6c81ea 100644
--- a/test/option-k.py
+++ b/test/option-k.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/option/debug-count.py b/test/option/debug-count.py
index f2fceb4..cf46feb 100644
--- a/test/option/debug-count.py
+++ b/test/option/debug-count.py
@@ -34,13 +34,6 @@ import TestSCons
test = TestSCons.TestSCons()
-try:
- import weakref
-except ImportError:
- x = "Python version has no 'weakref' module; skipping tests.\n"
- test.skip_test(x)
-
-
test.write('SConstruct', """
DefaultEnvironment(tools=[])
diff --git a/test/option/debug-objects.py b/test/option/debug-objects.py
index beec4b7..9c8536c 100644
--- a/test/option/debug-objects.py
+++ b/test/option/debug-objects.py
@@ -32,13 +32,6 @@ import TestSCons
test = TestSCons.TestSCons()
-try:
- import weakref
-except ImportError:
- x = "Python version has no 'weakref' module; skipping tests.\n"
- test.skip_test(x)
-
-
test.write('SConstruct', """
DefaultEnvironment(tools=[])
diff --git a/test/packaging/place-files-in-subdirectory.py b/test/packaging/place-files-in-subdirectory.py
index 838d6b8..dd422e6 100644
--- a/test/packaging/place-files-in-subdirectory.py
+++ b/test/packaging/place-files-in-subdirectory.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test the requirement to place files in a given subdirectory before archiving.
"""
-import os
import subprocess
import TestSCons
diff --git a/test/python-version.py b/test/python-version.py
index 9cfd2bd..bbec233 100644
--- a/test/python-version.py
+++ b/test/python-version.py
@@ -29,7 +29,6 @@ Verify the behavior of our check for unsupported or deprecated versions
of Python.
"""
-import os
import re
import TestCmd
diff --git a/test/runtest/testlistfile.py b/test/runtest/testlistfile.py
index 063a8d0..ba034e8 100644
--- a/test/runtest/testlistfile.py
+++ b/test/runtest/testlistfile.py
@@ -29,7 +29,6 @@ Test a list of tests to run in a file specified with the -f option.
"""
import os.path
-import re
import TestRuntest
diff --git a/test/scons-time/func/prefix.py b/test/scons-time/func/prefix.py
index 67a0c6b..36c9ddf 100644
--- a/test/scons-time/func/prefix.py
+++ b/test/scons-time/func/prefix.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that the func -p and --prefix options specify what log files to use.
"""
-import os.path
import TestSCons_time
diff --git a/test/scons-time/run/archive/zip.py b/test/scons-time/run/archive/zip.py
index 4620440..7bd5538 100644
--- a/test/scons-time/run/archive/zip.py
+++ b/test/scons-time/run/archive/zip.py
@@ -29,7 +29,6 @@ Verify basic generation of timing information from an input fake-project
.zip file.
"""
-import sys
import TestSCons_time
diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py
index cd82fac..47fe94f 100644
--- a/test/sconsign/script/SConsignFile.py
+++ b/test/sconsign/script/SConsignFile.py
@@ -29,7 +29,6 @@ Verify that the sconsign script works with files generated when
using the signatures in an SConsignFile().
"""
-import re
import TestSCons
import TestSConsign
diff --git a/test/silent-command.py b/test/silent-command.py
index 7f3b010..3622a04 100644
--- a/test/silent-command.py
+++ b/test/silent-command.py
@@ -28,7 +28,6 @@ Test the use of a preceding @ to suppress printing a command.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
import TestSCons
diff --git a/test/srcchange.py b/test/srcchange.py
index 30f6f20..e72d923 100644
--- a/test/srcchange.py
+++ b/test/srcchange.py
@@ -32,7 +32,6 @@ of Decider('content').
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/subdir.py b/test/subdir.py
index 363d44c..c5bfcdc 100644
--- a/test/subdir.py
+++ b/test/subdir.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
-import os.path
_python_ = TestSCons._python_
diff --git a/test/symlink/dangling-include.py b/test/symlink/dangling-include.py
index b7d5d2f..081573f 100644
--- a/test/symlink/dangling-include.py
+++ b/test/symlink/dangling-include.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test how we handle #includes of dangling symlinks.
"""
-import os
import TestSCons
diff --git a/test/symlink/dangling-source.py b/test/symlink/dangling-source.py
index b2bc540..94690f4 100644
--- a/test/symlink/dangling-source.py
+++ b/test/symlink/dangling-source.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test how we handle dangling symlinks as source files.
"""
-import os
import TestSCons
diff --git a/test/timestamp-fallback.py b/test/timestamp-fallback.py
index 2dd50a2..b3e812b 100644
--- a/test/timestamp-fallback.py
+++ b/test/timestamp-fallback.py
@@ -32,7 +32,6 @@ rare no-md5 Pythons comes into play (some entities ban the use
of md5 as unsafe, although SCons does not use it in a security context.
"""
-import sys
import os
import TestSCons
diff --git a/test/tool_args.py b/test/tool_args.py
index 6983705..464d009 100644
--- a/test/tool_args.py
+++ b/test/tool_args.py
@@ -29,7 +29,6 @@ Test the ability to pass a dictionary of keyword arguments to
a Tool specification's generate() method.
"""
-import os.path
import TestSCons
diff --git a/test/toolpath/basic.py b/test/toolpath/basic.py
index 793497b..0d2429e 100644
--- a/test/toolpath/basic.py
+++ b/test/toolpath/basic.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
diff --git a/test/toolpath/nested/nested.py b/test/toolpath/nested/nested.py
index df2ba07..47c0b03 100644
--- a/test/toolpath/nested/nested.py
+++ b/test/toolpath/nested/nested.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/toolpath/relative_import/relative_import.py b/test/toolpath/relative_import/relative_import.py
index 8fa2f62..f4362f7 100644
--- a/test/toolpath/relative_import/relative_import.py
+++ b/test/toolpath/relative_import/relative_import.py
@@ -24,7 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
import TestSCons
test = TestSCons.TestSCons()
diff --git a/test/update-release-info/update-release-info.py b/test/update-release-info/update-release-info.py
index f353d38..2de4713 100644
--- a/test/update-release-info/update-release-info.py
+++ b/test/update-release-info/update-release-info.py
@@ -27,7 +27,8 @@ have the appropriate triggers to cause the modifications.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os, sys, time
+import os
+import time
import TestRuntest
diff --git a/test/virtualenv/activated/option/enable-virtualenv.py b/test/virtualenv/activated/option/enable-virtualenv.py
index a5ceecc..ff06583 100644
--- a/test/virtualenv/activated/option/enable-virtualenv.py
+++ b/test/virtualenv/activated/option/enable-virtualenv.py
@@ -30,7 +30,6 @@ Ensure that the --enable-virtualenv flag works.
import TestSCons
import SCons.Platform.virtualenv
-import sys
import os
import re
diff --git a/test/virtualenv/activated/option/ignore-virtualenv.py b/test/virtualenv/activated/option/ignore-virtualenv.py
index ac6f945..b0d482e 100644
--- a/test/virtualenv/activated/option/ignore-virtualenv.py
+++ b/test/virtualenv/activated/option/ignore-virtualenv.py
@@ -30,7 +30,6 @@ Ensure that the --ignore-virtualenv flag works.
import TestSCons
import SCons.Platform.virtualenv
-import sys
import os
import re
diff --git a/test/virtualenv/activated/virtualenv_activated_python.py b/test/virtualenv/activated/virtualenv_activated_python.py
index c673ae1..4e793da 100644
--- a/test/virtualenv/activated/virtualenv_activated_python.py
+++ b/test/virtualenv/activated/virtualenv_activated_python.py
@@ -33,7 +33,6 @@ environment or in unactivated virtualenv.
import TestSCons
import SCons.Platform.virtualenv
-import sys
import os
import re
diff --git a/test/virtualenv/activated/virtualenv_detect_virtualenv.py b/test/virtualenv/activated/virtualenv_detect_virtualenv.py
index 2c00793..e7b7cb0 100644
--- a/test/virtualenv/activated/virtualenv_detect_virtualenv.py
+++ b/test/virtualenv/activated/virtualenv_detect_virtualenv.py
@@ -30,7 +30,6 @@ Check if SCons.Platform.virtualenv.Virtualenv() works in SConscripts.
import TestSCons
import SCons.Platform.virtualenv
-import sys
test = TestSCons.TestSCons()
diff --git a/test/virtualenv/regularenv/virtualenv_detect_regularenv.py b/test/virtualenv/regularenv/virtualenv_detect_regularenv.py
index 57a0d4f..6856838 100644
--- a/test/virtualenv/regularenv/virtualenv_detect_regularenv.py
+++ b/test/virtualenv/regularenv/virtualenv_detect_regularenv.py
@@ -30,7 +30,6 @@ Check if SCons.Platform.virtualenv.Virtualenv() works in SConscript.
import TestSCons
import SCons.Platform.virtualenv
-import sys
test = TestSCons.TestSCons()
diff --git a/test/virtualenv/unactivated/virtualenv_unactivated_python.py b/test/virtualenv/unactivated/virtualenv_unactivated_python.py
index a4dc240..38d5329 100644
--- a/test/virtualenv/unactivated/virtualenv_unactivated_python.py
+++ b/test/virtualenv/unactivated/virtualenv_unactivated_python.py
@@ -33,7 +33,6 @@ a regular environment or in an activated virtualenv.
import TestSCons
import SCons.Platform.virtualenv
-import sys
import os
import re
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py
index f0051ba..558bf44 100644
--- a/testing/framework/TestCmd.py
+++ b/testing/framework/TestCmd.py
@@ -309,7 +309,6 @@ import tempfile
import threading
import time
import traceback
-import types
from collections import UserList, UserString
from subprocess import PIPE, STDOUT
diff --git a/testing/framework/TestCmdTests.py b/testing/framework/TestCmdTests.py
index 7017d2c..e37b90e 100644
--- a/testing/framework/TestCmdTests.py
+++ b/testing/framework/TestCmdTests.py
@@ -24,13 +24,11 @@ __revision__ = "TestCmdTests.py 1.3.D001 2010/06/03 12:58:27 knight"
import os
import shutil
-import signal
import stat
import subprocess
import sys
import tempfile
import time
-import types
import unittest
from io import StringIO
from contextlib import closing
diff --git a/testing/framework/TestCommon.py b/testing/framework/TestCommon.py
index 35bf365..1471439 100644
--- a/testing/framework/TestCommon.py
+++ b/testing/framework/TestCommon.py
@@ -99,7 +99,6 @@ __author__ = "Steven Knight <knight at baldmt dot com>"
__revision__ = "TestCommon.py 1.3.D001 2010/06/03 12:58:27 knight"
__version__ = "1.3"
-import copy
import glob
import os
import stat
diff --git a/testing/framework/TestCommonTests.py b/testing/framework/TestCommonTests.py
index 6c9e92d..8a93b35 100644
--- a/testing/framework/TestCommonTests.py
+++ b/testing/framework/TestCommonTests.py
@@ -22,11 +22,9 @@ SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
__author__ = "Steven Knight <knight at baldmt dot com>"
__revision__ = "TestCommonTests.py 1.3.D001 2010/06/03 12:58:27 knight"
-import difflib
import os
import re
import signal
-import stat
import sys
import unittest
diff --git a/testing/framework/TestSConsign.py b/testing/framework/TestSConsign.py
index 665059c..11a764c 100644
--- a/testing/framework/TestSConsign.py
+++ b/testing/framework/TestSConsign.py
@@ -19,7 +19,6 @@ in this subclass.
import os
import os.path
-import sys
from TestSCons import *
from TestSCons import __all__