Commit 087783f5 authored by Stefan Behnel's avatar Stefan Behnel

test fixes

parent 3d913d25
...@@ -5,7 +5,7 @@ class TestCause(unittest.TestCase): ...@@ -5,7 +5,7 @@ class TestCause(unittest.TestCase):
try: try:
raise IndexError from 5 raise IndexError from 5
except TypeError as e: except TypeError as e:
self.assertIn("exception cause", str(e)) self.assertTrue("exception cause" in str(e))
else: else:
self.fail("No exception raised") self.fail("No exception raised")
...@@ -13,7 +13,7 @@ class TestCause(unittest.TestCase): ...@@ -13,7 +13,7 @@ class TestCause(unittest.TestCase):
try: try:
raise IndexError from KeyError raise IndexError from KeyError
except IndexError as e: except IndexError as e:
self.assertIsInstance(e.__cause__, KeyError) self.assertTrue(isinstance(e.__cause__, KeyError))
else: else:
self.fail("No exception raised") self.fail("No exception raised")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment