From a910451a1f5e729e24ede5bfccbab032b6d4a5a6 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 22 May 2023 14:03:08 -0600 Subject: Drop dead code from unit tests Remove dead code: some mocked classes in unit tests had methods which have been removed from the Node class they're mocking, there's no need to shadow those any more as there are no callers. The methods are depends_on (base functionality removed in 2005 ) and is_pseudeo_derived (base functionality removed in 2006). Signed-off-by: Mats Wichmann --- CHANGES.txt | 6 ++++++ SCons/SConfTests.py | 2 -- SCons/Taskmaster/TaskmasterTests.py | 9 --------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6e8e677..569c5a0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,12 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER that if arg was a list, a ListAction was *always* returned; mention default Decider and sort the names of available decider functions, and add a version marking. Minor fiddling with Alias.py docstrings. + - Remove dead code: some mocked classes in unit tests had methods + which have been removed from the Node class they're mocking, + there's no need to shadow those any more as there are no callers. + The methods are depends_on (base functionality removed in 2005) + and is_pseudeo_derived (base functionality removed in 2006). There + may well be more! RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 diff --git a/SCons/SConfTests.py b/SCons/SConfTests.py index e8e0fc7..96ba926 100644 --- a/SCons/SConfTests.py +++ b/SCons/SConfTests.py @@ -199,8 +199,6 @@ class SConfTestCase(unittest.TestCase): self.state = state def alter_targets(self): return [], None - def depends_on(self, nodes): - return None def postprocess(self) -> None: pass def clear(self) -> None: diff --git a/SCons/Taskmaster/TaskmasterTests.py b/SCons/Taskmaster/TaskmasterTests.py index 32959fb..83b7ea9 100644 --- a/SCons/Taskmaster/TaskmasterTests.py +++ b/SCons/Taskmaster/TaskmasterTests.py @@ -197,18 +197,9 @@ class Node: def store_bsig(self) -> None: pass - def is_pseudo_derived(self) -> None: - pass - def is_up_to_date(self): return self._current_val - def depends_on(self, nodes) -> int: - for node in nodes: - if node in self.kids: - return 1 - return 0 - def __str__(self) -> str: return self.name -- cgit v0.12