diff --git a/pandas/tests/test_categorical.py b/pandas/tests/test_categorical.py index a7f241168ea73..cd78fd22e64ca 100644 --- a/pandas/tests/test_categorical.py +++ b/pandas/tests/test_categorical.py @@ -86,7 +86,11 @@ def test_constructor_unsortable(self): self.assertFalse(factor.ordered) # this however will raise as cannot be sorted - self.assertRaises(TypeError, lambda : Categorical.from_array(arr, ordered=True)) + # but fixed in newer versions of numpy + if LooseVersion(np.__version__) < "1.10": + self.assertRaises(TypeError, lambda : Categorical.from_array(arr, ordered=True)) + else: + Categorical.from_array(arr, ordered=True) def test_constructor(self):