diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-06-15 14:28:28 +0000 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-06-15 14:28:28 +0000 |
commit | 0ed55e71a9f4b9cda836c6a4a5408cece60db0c6 (patch) | |
tree | b1e82f6e428ac15ed9b4de93e48d8079420d537d /src/engine/SCons/cppTests.py | |
parent | fe00e4f75ba00298c30d6854b245c2a42c6542b8 (diff) | |
parent | 738149c9bfb9965d013d01ef99f9bb1c2819e7e8 (diff) |
Merge commit 'upstream/2.0.0'
Diffstat (limited to 'src/engine/SCons/cppTests.py')
-rw-r--r-- | src/engine/SCons/cppTests.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/engine/SCons/cppTests.py b/src/engine/SCons/cppTests.py index 4469987..63ddf06 100644 --- a/src/engine/SCons/cppTests.py +++ b/src/engine/SCons/cppTests.py @@ -21,9 +21,8 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/cppTests.py 4720 2010/03/24 03:14:11 jars" +__revision__ = "src/engine/SCons/cppTests.py 5023 2010/06/14 22:05:46 scons" -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) |