summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2023-05-22 20:03:08 (GMT)
committerMats Wichmann <mats@linux.com>2023-05-22 20:03:08 (GMT)
commita910451a1f5e729e24ede5bfccbab032b6d4a5a6 (patch)
tree90703aa8d183990bca9b9800730ef6e16e7ae379
parentc9eda97784f1b6902e1818ac13f8c572f8d8cbab (diff)
downloadSCons-a910451a1f5e729e24ede5bfccbab032b6d4a5a6.zip
SCons-a910451a1f5e729e24ede5bfccbab032b6d4a5a6.tar.gz
SCons-a910451a1f5e729e24ede5bfccbab032b6d4a5a6.tar.bz2
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 <mats@linux.com>
-rw-r--r--CHANGES.txt6
-rw-r--r--SCons/SConfTests.py2
-rw-r--r--SCons/Taskmaster/TaskmasterTests.py9
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