diff options
Diffstat (limited to 'test/CC')
-rw-r--r-- | test/CC/CC.py | 9 | ||||
-rw-r--r-- | test/CC/CCCOM.py | 2 | ||||
-rw-r--r-- | test/CC/CCCOMSTR.py | 2 | ||||
-rw-r--r-- | test/CC/SHCC.py | 6 | ||||
-rw-r--r-- | test/CC/SHCCCOM.py | 2 | ||||
-rw-r--r-- | test/CC/SHCCCOMSTR.py | 2 | ||||
-rw-r--r-- | test/CC/SHCCFLAGS.py | 3 | ||||
-rw-r--r-- | test/CC/SHCFLAGS.py | 3 |
8 files changed, 11 insertions, 18 deletions
diff --git a/test/CC/CC.py b/test/CC/CC.py index c412094..2c66040 100644 --- a/test/CC/CC.py +++ b/test/CC/CC.py @@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import sys import TestSCons @@ -39,7 +38,6 @@ test = TestSCons.TestSCons() if sys.platform == 'win32': test.write('mylink.py', r""" -import string import sys args = sys.argv[1:] while args: @@ -47,7 +45,7 @@ while args: if a[0] != '/': break args = args[1:] - if string.lower(a[:5]) == '/out:': out = a[5:] + if a[:5].lower() == '/out:': out = a[5:] infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): @@ -149,11 +147,10 @@ env.Program(target = 'test2', source = 'test2.C') 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/CC/CCCOM.py b/test/CC/CCCOM.py index 6634e15..8d06942 100644 --- a/test/CC/CCCOM.py +++ b/test/CC/CCCOM.py @@ -43,7 +43,7 @@ test.write('mycc.py', r""" import sys outfile = open(sys.argv[1], 'wb') infile = open(sys.argv[2], 'rb') -for l in filter(lambda l: l[:6] != '/*cc*/', infile.readlines()): +for l in [l for l in infile.readlines() if l[:6] != '/*cc*/']: outfile.write(l) sys.exit(0) """) diff --git a/test/CC/CCCOMSTR.py b/test/CC/CCCOMSTR.py index f66a192..6874406 100644 --- a/test/CC/CCCOMSTR.py +++ b/test/CC/CCCOMSTR.py @@ -44,7 +44,7 @@ test.write('mycc.py', r""" import sys outfile = open(sys.argv[1], 'wb') infile = open(sys.argv[2], 'rb') -for l in filter(lambda l: l[:6] != '/*cc*/', infile.readlines()): +for l in [l for l in infile.readlines() if l[:6] != '/*cc*/']: outfile.write(l) sys.exit(0) """) diff --git a/test/CC/SHCC.py b/test/CC/SHCC.py index f80dfe5..b624bf2 100644 --- a/test/CC/SHCC.py +++ b/test/CC/SHCC.py @@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import TestSCons @@ -35,11 +34,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/CC/SHCCCOM.py b/test/CC/SHCCCOM.py index ab61035..0e87b62 100644 --- a/test/CC/SHCCCOM.py +++ b/test/CC/SHCCCOM.py @@ -42,7 +42,7 @@ test.write('mycc.py', r""" import sys outfile = open(sys.argv[1], 'wb') infile = open(sys.argv[2], 'rb') -for l in filter(lambda l: l[:6] != '/*cc*/', infile.readlines()): +for l in [l for l in infile.readlines() if l[:6] != '/*cc*/']: outfile.write(l) sys.exit(0) """) diff --git a/test/CC/SHCCCOMSTR.py b/test/CC/SHCCCOMSTR.py index 05c27ad..15bfa85 100644 --- a/test/CC/SHCCCOMSTR.py +++ b/test/CC/SHCCCOMSTR.py @@ -44,7 +44,7 @@ test.write('mycc.py', r""" import sys outfile = open(sys.argv[1], 'wb') infile = open(sys.argv[2], 'rb') -for l in filter(lambda l: l[:6] != '/*cc*/', infile.readlines()): +for l in [l for l in infile.readlines() if l[:6] != '/*cc*/']: outfile.write(l) sys.exit(0) """) diff --git a/test/CC/SHCCFLAGS.py b/test/CC/SHCCFLAGS.py index d77d247..72d36b1 100644 --- a/test/CC/SHCCFLAGS.py +++ b/test/CC/SHCCFLAGS.py @@ -27,7 +27,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import sys import TestSCons import os -import string test = TestSCons.TestSCons() @@ -37,7 +36,7 @@ barflags = e['SHCCFLAGS'] + ' -DBAR' if os.name == 'posix': os.environ['LD_LIBRARY_PATH'] = '.' -if string.find(sys.platform, 'irix') > -1: +if sys.platform.find('irix') > -1: os.environ['LD_LIBRARYN32_PATH'] = '.' test.write('SConstruct', """ diff --git a/test/CC/SHCFLAGS.py b/test/CC/SHCFLAGS.py index c201c97..3ec6778 100644 --- a/test/CC/SHCFLAGS.py +++ b/test/CC/SHCFLAGS.py @@ -27,7 +27,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import sys import TestSCons import os -import string test = TestSCons.TestSCons() @@ -37,7 +36,7 @@ barflags = e['SHCFLAGS'] + ' -DBAR' if os.name == 'posix': os.environ['LD_LIBRARY_PATH'] = '.' -if string.find(sys.platform, 'irix') > -1: +if sys.platform.find('irix') > -1: os.environ['LD_LIBRARYN32_PATH'] = '.' test.write('SConstruct', """ |