summaryrefslogtreecommitdiffstats
path: root/test/LINK
diff options
context:
space:
mode:
Diffstat (limited to 'test/LINK')
-rw-r--r--test/LINK/LINK.py6
-rw-r--r--test/LINK/LINKCOM.py2
-rw-r--r--test/LINK/LINKCOMSTR.py4
-rw-r--r--test/LINK/LINKFLAGS.py8
-rw-r--r--test/LINK/SHLINK.py6
-rw-r--r--test/LINK/SHLINKCOM.py4
-rw-r--r--test/LINK/SHLINKCOMSTR.py4
-rw-r--r--test/LINK/SHLINKFLAGS.py8
8 files changed, 16 insertions, 26 deletions
diff --git a/test/LINK/LINK.py b/test/LINK/LINK.py
index 21e2d66..25d9efb 100644
--- a/test/LINK/LINK.py
+++ b/test/LINK/LINK.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -36,11 +35,10 @@ test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
-import string
import sys
open('%s', 'wb').write("wrapper.py\\n")
-os.system(string.join(sys.argv[1:], " "))
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+os.system(" ".join(sys.argv[1:]))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
foo = Environment()
diff --git a/test/LINK/LINKCOM.py b/test/LINK/LINKCOM.py
index b3c56d6..f09e8f8 100644
--- a/test/LINK/LINKCOM.py
+++ b/test/LINK/LINKCOM.py
@@ -42,7 +42,7 @@ import sys
outfile = open(sys.argv[1], 'wb')
for f in sys.argv[2:]:
infile = open(f, 'rb')
- for l in filter(lambda l: l != '/*link*/\n', infile.readlines()):
+ for l in [l for l in infile.readlines() if l != '/*link*/\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/LINK/LINKCOMSTR.py b/test/LINK/LINKCOMSTR.py
index 7e12c1d..113bdcd 100644
--- a/test/LINK/LINKCOMSTR.py
+++ b/test/LINK/LINKCOMSTR.py
@@ -29,8 +29,6 @@ Test that the $LINKCOMSTR construction variable allows you to customize
the displayed linker string.
"""
-import string
-
import TestSCons
_python_ = TestSCons._python_
@@ -45,7 +43,7 @@ import sys
outfile = open(sys.argv[1], 'wb')
for f in sys.argv[2:]:
infile = open(f, 'rb')
- for l in filter(lambda l: l != '/*link*/\n', infile.readlines()):
+ for l in [l for l in infile.readlines() if l != '/*link*/\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/LINK/LINKFLAGS.py b/test/LINK/LINKFLAGS.py
index 1726709..442baf7 100644
--- a/test/LINK/LINKFLAGS.py
+++ b/test/LINK/LINKFLAGS.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -36,12 +35,11 @@ test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
-import string
import sys
open('%s', 'wb').write("wrapper.py\\n")
-args = filter(lambda s: s != 'fake_link_flag', sys.argv[1:])
-os.system(string.join(args, " "))
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+args = [s for s in sys.argv[1:] if s != 'fake_link_flag']
+os.system(" ".join(args))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
foo = Environment()
diff --git a/test/LINK/SHLINK.py b/test/LINK/SHLINK.py
index 2bd9bd6..bc1239b 100644
--- a/test/LINK/SHLINK.py
+++ b/test/LINK/SHLINK.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -37,11 +36,10 @@ test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
-import string
import sys
open('%s', 'wb').write("wrapper.py\\n")
-os.system(string.join(sys.argv[1:], " "))
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+os.system(" ".join(sys.argv[1:]))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
foo = Environment()
diff --git a/test/LINK/SHLINKCOM.py b/test/LINK/SHLINKCOM.py
index c507d31..8bdb9b5 100644
--- a/test/LINK/SHLINKCOM.py
+++ b/test/LINK/SHLINKCOM.py
@@ -41,7 +41,7 @@ import sys
outfile = open(sys.argv[1], 'wb')
for f in sys.argv[2:]:
infile = open(f, 'rb')
- for l in filter(lambda l: l != '/*cc*/\n', infile.readlines()):
+ for l in [l for l in infile.readlines() if l != '/*cc*/\n']:
outfile.write(l)
sys.exit(0)
@@ -51,7 +51,7 @@ import sys
outfile = open(sys.argv[1], 'wb')
for f in sys.argv[2:]:
infile = open(f, 'rb')
- for l in filter(lambda l: l != '/*link*/\n', infile.readlines()):
+ for l in [l for l in infile.readlines() if l != '/*link*/\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/LINK/SHLINKCOMSTR.py b/test/LINK/SHLINKCOMSTR.py
index 1d93b75..dd6f22b 100644
--- a/test/LINK/SHLINKCOMSTR.py
+++ b/test/LINK/SHLINKCOMSTR.py
@@ -42,7 +42,7 @@ import sys
outfile = open(sys.argv[1], 'wb')
for f in sys.argv[2:]:
infile = open(f, 'rb')
- for l in filter(lambda l: l != '/*cc*/\n', infile.readlines()):
+ for l in [l for l in infile.readlines() if l != '/*cc*/\n']:
outfile.write(l)
sys.exit(0)
@@ -52,7 +52,7 @@ import sys
outfile = open(sys.argv[1], 'wb')
for f in sys.argv[2:]:
infile = open(f, 'rb')
- for l in filter(lambda l: l != '/*link*/\n', infile.readlines()):
+ for l in [l for l in infile.readlines() if l != '/*link*/\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/LINK/SHLINKFLAGS.py b/test/LINK/SHLINKFLAGS.py
index ddd1a6c..57766de 100644
--- a/test/LINK/SHLINKFLAGS.py
+++ b/test/LINK/SHLINKFLAGS.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -37,12 +36,11 @@ test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
-import string
import sys
open('%s', 'wb').write("wrapper.py\\n")
-args = filter(lambda s: s != 'fake_shlink_flag', sys.argv[1:])
-os.system(string.join(args, " "))
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+args = [s for s in sys.argv[1:] if s != 'fake_shlink_flag']
+os.system(" ".join(args))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
foo = Environment()