From a29da32252b68bd944d3fbe14d56a3f896f9a7f1 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Wed, 4 May 2016 19:40:50 -0400 Subject: [PATCH] TEST: Don't assert particular numpy error. They change from version to version. --- tests/test_labelarray.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_labelarray.py b/tests/test_labelarray.py index a5a41157..fa1d2130 100644 --- a/tests/test_labelarray.py +++ b/tests/test_labelarray.py @@ -225,9 +225,6 @@ class LabelArrayTestCase(ZiplineTestCase): Test that all unfuncs fail. """ - def assert_ufunc_failure(exc): - self.assertEqual(str(exc), 'Not implemented for this type') - l = LabelArray(self.strs, '') ints = np.arange(len(l)) @@ -243,8 +240,8 @@ class LabelArrayTestCase(ZiplineTestCase): ret = func(l, ints) else: self.fail("Who added a ternary ufunc !?!") - except TypeError as e: - assert_ufunc_failure(e) + except TypeError: + pass else: self.assertIs(ret, NotImplemented)