diff options
author | Steven Knight <knight@baldmt.com> | 2010-05-12 05:21:33 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-05-12 05:21:33 (GMT) |
commit | 53fc08f1c8d9d4d0174247cb34b770342fd25068 (patch) | |
tree | db3ece8a678daf4f6d004096a05ddaaab94aa3a7 /src/engine/SCons/Scanner | |
parent | c94aad42405270dcfe9225d49fbf2aa2cae0b50d (diff) | |
download | SCons-53fc08f1c8d9d4d0174247cb34b770342fd25068.zip SCons-53fc08f1c8d9d4d0174247cb34b770342fd25068.tar.gz SCons-53fc08f1c8d9d4d0174247cb34b770342fd25068.tar.bz2 |
Convert old-style utility classes in unit test files (*Tests.py)
to new-style classes.
Diffstat (limited to 'src/engine/SCons/Scanner')
-rw-r--r-- | src/engine/SCons/Scanner/CTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/DirTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/FortranTests.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/IDLTests.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/ProgTests.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/ScannerTests.py | 12 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/engine/SCons/Scanner/CTests.py b/src/engine/SCons/Scanner/CTests.py index 34e3163..5523f10 100644 --- a/src/engine/SCons/Scanner/CTests.py +++ b/src/engine/SCons/Scanner/CTests.py @@ -320,7 +320,7 @@ class CScannerTestCase9(unittest.TestCase): def runTest(self): """Generate a warning when we can't find a #included file""" SCons.Warnings.enableWarningClass(SCons.Warnings.DependencyWarning) - class TestOut: + class TestOut(object): def __call__(self, x): self.out = x diff --git a/src/engine/SCons/Scanner/DirTests.py b/src/engine/SCons/Scanner/DirTests.py index 1e45e26..968d5d3 100644 --- a/src/engine/SCons/Scanner/DirTests.py +++ b/src/engine/SCons/Scanner/DirTests.py @@ -41,7 +41,7 @@ import SCons.Scanner.Dir # def Entry(self, name): # return self.fs.Entry(name) -class DummyEnvironment: +class DummyEnvironment(object): def __init__(self, root): self.fs = SCons.Node.FS.FS(root) def Dir(self, name): diff --git a/src/engine/SCons/Scanner/FortranTests.py b/src/engine/SCons/Scanner/FortranTests.py index 9ebe2e6..3388ffc 100644 --- a/src/engine/SCons/Scanner/FortranTests.py +++ b/src/engine/SCons/Scanner/FortranTests.py @@ -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('')) @@ -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 diff --git a/src/engine/SCons/Scanner/IDLTests.py b/src/engine/SCons/Scanner/IDLTests.py index 54b2373..c696722 100644 --- a/src/engine/SCons/Scanner/IDLTests.py +++ b/src/engine/SCons/Scanner/IDLTests.py @@ -186,7 +186,7 @@ test.write([ 'repository', 'src', 'ddd.idl'], "\n") # define some helpers: -class DummyEnvironment: +class DummyEnvironment(object): def __init__(self, listCppPath): self.path = listCppPath self.fs = SCons.Node.FS.FS(test.workpath('')) @@ -337,7 +337,7 @@ class IDLScannerTestCase7(unittest.TestCase): class IDLScannerTestCase8(unittest.TestCase): def runTest(self): SCons.Warnings.enableWarningClass(SCons.Warnings.DependencyWarning) - class TestOut: + class TestOut(object): def __call__(self, x): self.out = x diff --git a/src/engine/SCons/Scanner/ProgTests.py b/src/engine/SCons/Scanner/ProgTests.py index 2b02c90..411e035 100644 --- a/src/engine/SCons/Scanner/ProgTests.py +++ b/src/engine/SCons/Scanner/ProgTests.py @@ -43,7 +43,7 @@ for h in libs: # define some helpers: -class DummyEnvironment: +class DummyEnvironment(object): def __init__(self, **kw): self._dict = {'LIBSUFFIXES' : '.lib'} self._dict.update(kw) @@ -91,7 +91,7 @@ class DummyEnvironment: def File(self, filename): return self.fs.File(test.workpath(filename)) -class DummyNode: +class DummyNode(object): def __init__(self, name): self.name = name def rexists(self): diff --git a/src/engine/SCons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py index 2e9a72a..ee26922 100644 --- a/src/engine/SCons/Scanner/ScannerTests.py +++ b/src/engine/SCons/Scanner/ScannerTests.py @@ -30,7 +30,7 @@ import unittest import SCons.Scanner -class DummyFS: +class DummyFS(object): def File(self, name): return DummyNode(name) @@ -54,7 +54,7 @@ class DummyEnvironment(collections.UserDict): def get_factory(self, factory): return factory or self.fs.File -class DummyNode: +class DummyNode(object): def __init__(self, name, search_result=()): self.name = name self.search_result = tuple(search_result) @@ -106,7 +106,7 @@ class ScannerTestCase(unittest.TestCase): class BaseTestCase(unittest.TestCase): - class skey_node: + class skey_node(object): def __init__(self, key): self.key = key def scanner_key(self): @@ -338,7 +338,7 @@ class BaseTestCase(unittest.TestCase): assert s == 'xyzzy', s class SelectorTestCase(unittest.TestCase): - class skey_node: + class skey_node(object): def __init__(self, key): self.key = key def scanner_key(self): @@ -397,7 +397,7 @@ class SelectorTestCase(unittest.TestCase): class CurrentTestCase(unittest.TestCase): def test_class(self): """Test the Scanner.Current class""" - class MyNode: + class MyNode(object): def __init__(self): self.called_has_builder = None self.called_is_up_to_date = None @@ -471,7 +471,7 @@ class ClassicTestCase(unittest.TestCase): def test_scan(self): """Test the Scanner.Classic scan() method""" - class MyNode: + class MyNode(object): def __init__(self, name): self.name = name self._rfile = self |