diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 3536a52432b8c..0e6773fd83404 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -1807,8 +1807,7 @@ def test_order(self): idx = self.create_index() # 9816 deprecated if PY36: - with tm.assertRaisesRegexp(TypeError, "'>' not supported " - "between instances of 'str' and 'int'"): + with tm.assertRaisesRegexp(TypeError, "'>' not supported"): with tm.assert_produces_warning(FutureWarning): idx.order() elif PY3: @@ -1822,8 +1821,7 @@ def test_order(self): def test_argsort(self): idx = self.create_index() if PY36: - with tm.assertRaisesRegexp(TypeError, "'>' not supported " - "between instances of 'str' and 'int'"): + with tm.assertRaisesRegexp(TypeError, "'>' not supported"): result = idx.argsort() elif PY3: with tm.assertRaisesRegexp(TypeError, "unorderable types"): @@ -1836,8 +1834,7 @@ def test_argsort(self): def test_numpy_argsort(self): idx = self.create_index() if PY36: - with tm.assertRaisesRegexp(TypeError, "'>' not supported " - "between instances of 'str' and 'int'"): + with tm.assertRaisesRegexp(TypeError, "'>' not supported"): result = np.argsort(idx) elif PY3: with tm.assertRaisesRegexp(TypeError, "unorderable types"):