diff options
author | William Deegan <bill@baddogconsulting.com> | 2023-06-20 21:40:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 21:40:54 (GMT) |
commit | 22f4efcdec9b03b8a29aeab735d14ec7690efec0 (patch) | |
tree | 32092a9491b0d0a1f457109a195fb3384fc58c8b /SCons/Scanner | |
parent | baa9efffd9cbcba32c09958ce83afa95796bbbf3 (diff) | |
parent | f5f303d8e8087dcf658d203811f152fbea042721 (diff) | |
download | SCons-22f4efcdec9b03b8a29aeab735d14ec7690efec0.zip SCons-22f4efcdec9b03b8a29aeab735d14ec7690efec0.tar.gz SCons-22f4efcdec9b03b8a29aeab735d14ec7690efec0.tar.bz2 |
Merge branch 'master' into master
Diffstat (limited to 'SCons/Scanner')
-rw-r--r-- | SCons/Scanner/JavaTests.py | 4 | ||||
-rw-r--r-- | SCons/Scanner/ProgTests.py | 8 | ||||
-rw-r--r-- | SCons/Scanner/ScannerTests.py | 45 |
3 files changed, 29 insertions, 28 deletions
diff --git a/SCons/Scanner/JavaTests.py b/SCons/Scanner/JavaTests.py index 38a4bdb..0a3c759 100644 --- a/SCons/Scanner/JavaTests.py +++ b/SCons/Scanner/JavaTests.py @@ -96,8 +96,8 @@ class DummyNode: def __init__(self, name) -> None: self.name = name - def rexists(self) -> int: - return 1 + def rexists(self) -> bool: + return True def __str__(self) -> str: return self.name diff --git a/SCons/Scanner/ProgTests.py b/SCons/Scanner/ProgTests.py index 2798ab6..37eb48a 100644 --- a/SCons/Scanner/ProgTests.py +++ b/SCons/Scanner/ProgTests.py @@ -89,11 +89,11 @@ class DummyEnvironment: class DummyNode: def __init__(self, name) -> None: self.name = name - def rexists(self) -> int: - return 1 + def rexists(self) -> bool: + return True def __str__(self) -> str: return self.name - + def deps_match(deps, libs): deps=sorted(map(str, deps)) libs.sort() @@ -195,7 +195,7 @@ class ProgramScannerTestCase7(unittest.TestCase): class ProgramScannerTestCase8(unittest.TestCase): def runTest(self) -> None: - + n1 = DummyNode('n1') env = DummyEnvironment(LIBPATH=[ test.workpath("dir") ], LIBS=[n1], diff --git a/SCons/Scanner/ScannerTests.py b/SCons/Scanner/ScannerTests.py index 1fbbb62..a777ba5 100644 --- a/SCons/Scanner/ScannerTests.py +++ b/SCons/Scanner/ScannerTests.py @@ -124,8 +124,8 @@ class ScannerBaseTestCase(unittest.TestCase): self.key = key def scanner_key(self): return self.key - def rexists(self) -> int: - return 1 + def rexists(self) -> bool: + return True def func(self, filename, env, target, *args): self.filename = filename @@ -343,13 +343,14 @@ class ScannerBaseTestCase(unittest.TestCase): assert s == 'xyzzy', s class SelectorTestCase(unittest.TestCase): + class skey_node: def __init__(self, key) -> None: self.key = key def scanner_key(self): return self.key - def rexists(self) -> int: - return 1 + def rexists(self) -> bool: + return True def test___init__(self) -> None: """Test creation of Scanner.Selector object""" @@ -407,28 +408,28 @@ class CurrentTestCase(unittest.TestCase): self.called_has_builder = None self.called_is_up_to_date = None self.func_called = None - def rexists(self) -> int: - return 1 + def rexists(self) -> bool: + return True class HasNoBuilder(MyNode): - def has_builder(self): - self.called_has_builder = 1 - return None + def has_builder(self) -> bool: + self.called_has_builder = True + return False class IsNotCurrent(MyNode): - def has_builder(self) -> int: - self.called_has_builder = 1 - return 1 - def is_up_to_date(self): - self.called_is_up_to_date = 1 - return None + def has_builder(self) -> bool: + self.called_has_builder = True + return True + def is_up_to_date(self) -> bool: + self.called_is_up_to_date = True + return False class IsCurrent(MyNode): - def has_builder(self) -> int: - self.called_has_builder = 1 - return 1 - def is_up_to_date(self) -> int: - self.called_is_up_to_date = 1 - return 1 + def has_builder(self) -> bool: + self.called_has_builder = True + return True + def is_up_to_date(self) -> bool: + self.called_is_up_to_date = True + return True def func(node, env, path): - node.func_called = 1 + node.func_called = True return [] env = DummyEnvironment() s = Current(func) |