Skip to content

Commit 642734e

Browse files
committed
BUG: Avoid mixed-type Index in argsort test to prevent sorting errors
1 parent d7b534e commit 642734e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/tests/indexes/test_old_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ def test_memory_usage_doesnt_trigger_engine(self, index):
357357
def test_argsort(self, index):
358358
if isinstance(index, CategoricalIndex):
359359
pytest.skip(f"{type(self).__name__} separately tested")
360+
if any(isinstance(x, str) for x in index) and any(isinstance(x, int) for x in index):
361+
pytest.skip("Mixed types (int & str) not order-able")
360362

361363
result = index.argsort()
362364
expected = np.array(index).argsort()

0 commit comments

Comments
 (0)