forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick upstream commit to fix test failure caused by test_argsort()
Reference: 1. pandas-dev#17010 2. pandas-dev#17046 3. pandas-dev#17051 4. pandas-dev@df6934c 5. pandas-dev@480d574 Gbp-Dch: Short
- Loading branch information
1 parent
48a39a8
commit f3181af
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From df6934cad28c33c3eaf584ad3519cc1b9b8e16f4 Mon Sep 17 00:00:00 2001 | ||
From: ysau <yatshan.au@gmail.com> | ||
Date: Fri, 21 Jul 2017 21:21:38 -0700 | ||
Subject: [PATCH] # 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 e4c50ec93f9..91d3e9e7b93 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 | ||
^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 480d5745e1443de6e91a9f9c42d94e29705a3f43 Mon Sep 17 00:00:00 2001 | ||
From: ysau <yatshan.au@gmail.com> | ||
Date: Fri, 21 Jul 2017 16:29:12 -0700 | ||
Subject: [PATCH] # 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 91d3e9e7b93..e4c50ec93f9 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 692cdd49579..842e8fea0df 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"): |