From: Stefan Behnel Date: Thu, 28 Apr 2011 21:30:17 +0000 (+0200) Subject: test fixes X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=087783f55dc743bb90af9974bd2c5673dad32d97;p=cython.git test fixes --- 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")