From 480d5745e1443de6e91a9f9c42d94e29705a3f43 Mon Sep 17 00:00:00 2001 From: ysau Date: Fri, 21 Jul 2017 16:29:12 -0700 Subject: [PATCH 1/2] # Issue 17046 # # modified: /pandas/tests/indexes/test_base.py, # /doc/source/whatsnew/v0.21.0.txt # # Include both '>' and '<' in the error message in # TestMixedIntIndex.test_argsort and # TestMixedIntIndex.test_numpy_argsort --- doc/source/whatsnew/v0.21.0.txt | 1 + pandas/tests/indexes/test_base.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 91d3e9e7b935b..e4c50ec93f9e1 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -259,6 +259,7 @@ Indexing - Fixes bug where indexing with ``np.inf`` caused an ``OverflowError`` to be raised (:issue:`16957`) - Bug in reindexing on an empty ``CategoricalIndex`` (:issue:`16770`) - Fixes ``DataFrame.loc`` for setting with alignment and tz-aware ``DatetimeIndex`` (:issue:`16889`) +- Fixes ``test_argsort``, ``test_numpy_argsort`` to cover both `>` and `<` in the error message (:issue:`17046`) I/O ^^^ diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 692cdd4957947..842e8fea0df9b 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -1846,7 +1846,7 @@ def create_index(self): def test_argsort(self): idx = self.create_index() if PY36: - with tm.assert_raises_regex(TypeError, "'>' not supported"): + with tm.assert_raises_regex(TypeError, "'>|<' not supported"): result = idx.argsort() elif PY3: with tm.assert_raises_regex(TypeError, "unorderable types"): @@ -1859,7 +1859,7 @@ def test_argsort(self): def test_numpy_argsort(self): idx = self.create_index() if PY36: - with tm.assert_raises_regex(TypeError, "'>' not supported"): + with tm.assert_raises_regex(TypeError, "'>|<' not supported"): result = np.argsort(idx) elif PY3: with tm.assert_raises_regex(TypeError, "unorderable types"): From df6934cad28c33c3eaf584ad3519cc1b9b8e16f4 Mon Sep 17 00:00:00 2001 From: ysau Date: Fri, 21 Jul 2017 21:21:38 -0700 Subject: [PATCH 2/2] # modified: /doc/source/whatsnew/v0.21.0.txt # # undone update to release note --- doc/source/whatsnew/v0.21.0.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index e4c50ec93f9e1..91d3e9e7b935b 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -259,7 +259,6 @@ Indexing - Fixes bug where indexing with ``np.inf`` caused an ``OverflowError`` to be raised (:issue:`16957`) - Bug in reindexing on an empty ``CategoricalIndex`` (:issue:`16770`) - Fixes ``DataFrame.loc`` for setting with alignment and tz-aware ``DatetimeIndex`` (:issue:`16889`) -- Fixes ``test_argsort``, ``test_numpy_argsort`` to cover both `>` and `<` in the error message (:issue:`17046`) I/O ^^^