From 738149c9bfb9965d013d01ef99f9bb1c2819e7e8 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Tue, 15 Jun 2010 14:28:22 +0000 Subject: Imported Upstream version 2.0.0 --- src/engine/SCons/Scanner/FortranTests.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/engine/SCons/Scanner/FortranTests.py') diff --git a/src/engine/SCons/Scanner/FortranTests.py b/src/engine/SCons/Scanner/FortranTests.py index 3ebb9a2..66eb057 100644 --- a/src/engine/SCons/Scanner/FortranTests.py +++ b/src/engine/SCons/Scanner/FortranTests.py @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/FortranTests.py 4720 2010/03/24 03:14:11 jars" +__revision__ = "src/engine/SCons/Scanner/FortranTests.py 5023 2010/06/14 22:05:46 scons" import os import os.path @@ -207,7 +207,7 @@ test.write(['modules', 'use.mod'], "\n") # define some helpers: -class DummyEnvironment: +class DummyEnvironment(object): def __init__(self, listCppPath): self.path = listCppPath self.fs = SCons.Node.FS.FS(test.workpath('')) @@ -218,10 +218,10 @@ class DummyEnvironment: elif len(args) == 1 and args[0] == 'FORTRANPATH': return self.path else: - raise KeyError, "Dummy environment only has FORTRANPATH attribute." + raise KeyError("Dummy environment only has FORTRANPATH attribute.") def has_key(self, key): - return self.Dictionary().has_key(key) + return key in self.Dictionary() def __getitem__(self,key): return self.Dictionary()[key] @@ -238,9 +238,9 @@ class DummyEnvironment: return arg def subst_path(self, path, target=None, source=None, conv=None): - if type(path) != type([]): + if not isinstance(path, list): path = [path] - return map(self.subst, path) + return list(map(self.subst, path)) def get_calculator(self): return None @@ -255,8 +255,8 @@ class DummyEnvironment: return self.fs.File(filename) def deps_match(self, deps, headers): - scanned = map(os.path.normpath, map(str, deps)) - expect = map(os.path.normpath, headers) + scanned = list(map(os.path.normpath, list(map(str, deps)))) + expect = list(map(os.path.normpath, headers)) self.failUnless(scanned == expect, "expect %s != scanned %s" % (expect, scanned)) # define some tests: @@ -382,7 +382,7 @@ class FortranScannerTestCase10(unittest.TestCase): env.fs.chdir(env.Dir('')) path = s.path(env, dir) deps2 = s(env.File('#fff4.f'), env, path) - headers1 = map(test.workpath, ['include/f4.f']) + headers1 = list(map(test.workpath, ['include/f4.f'])) headers2 = ['include/f4.f'] deps_match(self, deps1, headers1) deps_match(self, deps2, headers2) @@ -390,7 +390,7 @@ class FortranScannerTestCase10(unittest.TestCase): class FortranScannerTestCase11(unittest.TestCase): def runTest(self): SCons.Warnings.enableWarningClass(SCons.Warnings.DependencyWarning) - class TestOut: + class TestOut(object): def __call__(self, x): self.out = x -- cgit v1.2.3