summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-01-23 20:01:00 (GMT)
committerMats Wichmann <mats@linux.com>2020-01-23 20:01:00 (GMT)
commit4d8892aff67876ac76031d72d8441da8ac46f342 (patch)
treeff0402c0dfcc50db1b695cf28a6b8d71234993f4
parentc35a2cdf0306e0cbc6a5215f9d77ac49debb1ece (diff)
downloadSCons-4d8892aff67876ac76031d72d8441da8ac46f342.zip
SCons-4d8892aff67876ac76031d72d8441da8ac46f342.tar.gz
SCons-4d8892aff67876ac76031d72d8441da8ac46f342.tar.bz2
[PR #3531] fix TestFailed usage another way
Per review, the replacement for (deprecated/removed) raising TestFailed is to call self.fail - updated to this. Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--src/engine/SCons/TaskmasterTests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine/SCons/TaskmasterTests.py b/src/engine/SCons/TaskmasterTests.py
index f23afd1..1a47230 100644
--- a/src/engine/SCons/TaskmasterTests.py
+++ b/src/engine/SCons/TaskmasterTests.py
@@ -935,7 +935,7 @@ class TaskmasterTestCase(unittest.TestCase):
except SCons.Errors.UserError:
pass
else:
- raise AssertionError("did not catch expected UserError")
+ self.fail("did not catch expected UserError")
def raise_BuildError():
raise SCons.Errors.BuildError
@@ -948,7 +948,7 @@ class TaskmasterTestCase(unittest.TestCase):
except SCons.Errors.BuildError:
pass
else:
- raise AssertionError("did not catch expected BuildError")
+ self.fail("did not catch expected BuildError")
# On a generic (non-BuildError) exception from a Builder,
# the target should throw a BuildError exception with the
@@ -968,7 +968,7 @@ class TaskmasterTestCase(unittest.TestCase):
exc_traceback = sys.exc_info()[2]
assert isinstance(e.exc_info[2], type(exc_traceback)), e.exc_info[2]
else:
- raise AssertionError("did not catch expected BuildError")
+ self.fail("did not catch expected BuildError")
built_text = None
cache_text = []