Skip to content

Commit 480d574

Browse files
author
ysau
committed
# 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
1 parent 4efe656 commit 480d574

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/whatsnew/v0.21.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Indexing
259259
- Fixes bug where indexing with ``np.inf`` caused an ``OverflowError`` to be raised (:issue:`16957`)
260260
- Bug in reindexing on an empty ``CategoricalIndex`` (:issue:`16770`)
261261
- Fixes ``DataFrame.loc`` for setting with alignment and tz-aware ``DatetimeIndex`` (:issue:`16889`)
262+
- Fixes ``test_argsort``, ``test_numpy_argsort`` to cover both `>` and `<` in the error message (:issue:`17046`)
262263

263264
I/O
264265
^^^

pandas/tests/indexes/test_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ def create_index(self):
18461846
def test_argsort(self):
18471847
idx = self.create_index()
18481848
if PY36:
1849-
with tm.assert_raises_regex(TypeError, "'>' not supported"):
1849+
with tm.assert_raises_regex(TypeError, "'>|<' not supported"):
18501850
result = idx.argsort()
18511851
elif PY3:
18521852
with tm.assert_raises_regex(TypeError, "unorderable types"):
@@ -1859,7 +1859,7 @@ def test_argsort(self):
18591859
def test_numpy_argsort(self):
18601860
idx = self.create_index()
18611861
if PY36:
1862-
with tm.assert_raises_regex(TypeError, "'>' not supported"):
1862+
with tm.assert_raises_regex(TypeError, "'>|<' not supported"):
18631863
result = np.argsort(idx)
18641864
elif PY3:
18651865
with tm.assert_raises_regex(TypeError, "unorderable types"):

0 commit comments

Comments
 (0)