TEST: Don't assert particular numpy error.

They change from version to version.
This commit is contained in:
Scott Sanderson
2016-05-04 19:40:50 -04:00
parent bd49647ce0
commit a29da32252
+2 -5
View File
@@ -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)