summaryrefslogtreecommitdiff
path: root/test_retrying.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_retrying.py')
-rw-r--r--test_retrying.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test_retrying.py b/test_retrying.py
index a1aac6f..b5f7ed6 100644
--- a/test_retrying.py
+++ b/test_retrying.py
@@ -193,7 +193,8 @@ class NoCustomErrorAfterCount:
"""
if self.counter < self.count:
self.counter += 1
- raise CustomError("This is a Custom exception class")
+ derived_message = "This is a Custom exception class"
+ raise CustomError(derived_message)
return True
def retry_if_result_none(result):
@@ -370,6 +371,8 @@ class TestDecoratorWrapper(unittest.TestCase):
self.assertTrue(re.last_attempt.value[0] is not None)
self.assertTrue(isinstance(re.last_attempt.value[1], CustomError))
self.assertTrue(re.last_attempt.value[2] is not None)
+
+ self.assertTrue("This is a Custom exception class" in str(re.last_attempt.value[1]))
print(re)
def test_defaults(self):