From 087783f55dc743bb90af9974bd2c5673dad32d97 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 28 Apr 2011 23:30:17 +0200 Subject: [PATCH] test fixes --- tests/run/test_raisefrom.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/run/test_raisefrom.pyx b/tests/run/test_raisefrom.pyx index 3a6110f3..24ad529d 100644 --- a/tests/run/test_raisefrom.pyx +++ b/tests/run/test_raisefrom.pyx @@ -5,7 +5,7 @@ class TestCause(unittest.TestCase): try: raise IndexError from 5 except TypeError as e: - self.assertIn("exception cause", str(e)) + self.assertTrue("exception cause" in str(e)) else: self.fail("No exception raised") @@ -13,7 +13,7 @@ class TestCause(unittest.TestCase): try: raise IndexError from KeyError except IndexError as e: - self.assertIsInstance(e.__cause__, KeyError) + self.assertTrue(isinstance(e.__cause__, KeyError)) else: self.fail("No exception raised") -- 2.26.2