diff options
| author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
|---|---|---|
| committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
| commit | 22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch) | |
| tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /src/engine/SCons/cppTests.py | |
| parent | 75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff) | |
| download | SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2 | |
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible;
the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'src/engine/SCons/cppTests.py')
| -rw-r--r-- | src/engine/SCons/cppTests.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/engine/SCons/cppTests.py b/src/engine/SCons/cppTests.py index 252a064..bfb0b46 100644 --- a/src/engine/SCons/cppTests.py +++ b/src/engine/SCons/cppTests.py @@ -23,7 +23,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import string import sys import unittest @@ -635,7 +634,7 @@ class fileTestCase(unittest.TestCase): def strip_initial_spaces(self, s): #lines = s.split('\n') - lines = string.split(s, '\n') + lines = s.split('\n') spaces = re.match(' *', lines[0]).group(0) def strip_spaces(l, spaces=spaces): #if l.startswith(spaces): @@ -643,7 +642,7 @@ class fileTestCase(unittest.TestCase): l = l[len(spaces):] return l #return '\n'.join([ strip_spaces(l) for l in lines ]) - return string.join(map(strip_spaces, lines), '\n') + return '\n'.join(map(strip_spaces, lines)) def write(self, file, contents): open(file, 'w').write(self.strip_initial_spaces(contents)) @@ -675,7 +674,7 @@ class fileTestCase(unittest.TestCase): """) class MyPreProcessor(cpp.DumbPreProcessor): def __init__(self, *args, **kw): - apply(cpp.DumbPreProcessor.__init__, (self,) + args, kw) + cpp.DumbPreProcessor.__init__(self, *args, **kw) self.files = [] def __call__(self, file): self.files.append(file) @@ -704,7 +703,7 @@ if __name__ == '__main__': except NameError: pass names.sort() - suite.addTests(map(tclass, names)) + suite.addTests(list(map(tclass, names))) if not unittest.TextTestRunner().run(suite).wasSuccessful(): sys.exit(1) |
