|
| 1 | +From 480d5745e1443de6e91a9f9c42d94e29705a3f43 Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Fri, 21 Jul 2017 16:29:12 -0700 |
| 4 | +Subject: [PATCH] # Issue 17046 # # modified: |
| 5 | + /pandas/tests/indexes/test_base.py, # |
| 6 | + /doc/source/whatsnew/v0.21.0.txt # # Include both '>' and '<' in the error |
| 7 | + message in # TestMixedIntIndex.test_argsort and # |
| 8 | + TestMixedIntIndex.test_numpy_argsort |
| 9 | + |
| 10 | +--- |
| 11 | + doc/source/whatsnew/v0.21.0.txt | 1 + |
| 12 | + pandas/tests/indexes/test_base.py | 4 ++-- |
| 13 | + 2 files changed, 3 insertions(+), 2 deletions(-) |
| 14 | + |
| 15 | +diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt |
| 16 | +index 91d3e9e7b93..e4c50ec93f9 100644 |
| 17 | +--- a/doc/source/whatsnew/v0.21.0.txt |
| 18 | ++++ b/doc/source/whatsnew/v0.21.0.txt |
| 19 | +@@ -259,6 +259,7 @@ Indexing |
| 20 | + - Fixes bug where indexing with ``np.inf`` caused an ``OverflowError`` to be raised (:issue:`16957`) |
| 21 | + - Bug in reindexing on an empty ``CategoricalIndex`` (:issue:`16770`) |
| 22 | + - Fixes ``DataFrame.loc`` for setting with alignment and tz-aware ``DatetimeIndex`` (:issue:`16889`) |
| 23 | ++- Fixes ``test_argsort``, ``test_numpy_argsort`` to cover both `>` and `<` in the error message (:issue:`17046`) |
| 24 | + |
| 25 | + I/O |
| 26 | + ^^^ |
| 27 | +diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py |
| 28 | +index 692cdd49579..842e8fea0df 100644 |
| 29 | +--- a/pandas/tests/indexes/test_base.py |
| 30 | ++++ b/pandas/tests/indexes/test_base.py |
| 31 | +@@ -1846,7 +1846,7 @@ def create_index(self): |
| 32 | + def test_argsort(self): |
| 33 | + idx = self.create_index() |
| 34 | + if PY36: |
| 35 | +- with tm.assert_raises_regex(TypeError, "'>' not supported"): |
| 36 | ++ with tm.assert_raises_regex(TypeError, "'>|<' not supported"): |
| 37 | + result = idx.argsort() |
| 38 | + elif PY3: |
| 39 | + with tm.assert_raises_regex(TypeError, "unorderable types"): |
| 40 | +@@ -1859,7 +1859,7 @@ def test_argsort(self): |
| 41 | + def test_numpy_argsort(self): |
| 42 | + idx = self.create_index() |
| 43 | + if PY36: |
| 44 | +- with tm.assert_raises_regex(TypeError, "'>' not supported"): |
| 45 | ++ with tm.assert_raises_regex(TypeError, "'>|<' not supported"): |
| 46 | + result = np.argsort(idx) |
| 47 | + elif PY3: |
| 48 | + with tm.assert_raises_regex(TypeError, "unorderable types"): |
0 commit comments