Skip to content

Commit bdf5bca

Browse files
committed
lf
1 parent 1eb050d commit bdf5bca

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

pandas/tests/indexes/multi/test_setops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def test_union_with_duplicates_keep_ea_dtype(dupe_val, any_numeric_ea_dtype):
627627
@pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning")
628628
def test_union_duplicates(index, request):
629629
# special case for mixed types
630-
if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])):
630+
if index.equals(Index([0, "a", 1, "b", 2, "c"])):
631631
index = index.map(str)
632632

633633
# GH#38977

pandas/tests/indexes/test_old_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def test_argsort(self, index):
371371

372372
def test_numpy_argsort(self, index):
373373
# new test for mixed-int-string
374-
if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])):
374+
if index.equals(Index([0, "a", 1, "b", 2, "c"])):
375375
result = np.argsort(index.astype(str))
376376
expected = index.astype(str).argsort()
377377
tm.assert_numpy_array_equal(result, expected)

pandas/tests/indexes/test_setops.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from pandas.core.dtypes.cast import find_common_type
1515

16-
import pandas as pd
1716
from pandas import (
1817
CategoricalDtype,
1918
CategoricalIndex,
@@ -77,9 +76,9 @@ def test_union_different_types(index_flat, index_flat2, request):
7776
idx1 = index_flat
7877
idx2 = index_flat2
7978

80-
# mixed int string
81-
if idx1.equals(pd.Index([0, "a", 1, "b", 2, "c"])) or idx2.equals(
82-
pd.Index([0, "a", 1, "b", 2, "c"])
79+
# Mixed int string
80+
if idx1.equals(Index([0, "a", 1, "b", 2, "c"])) or idx2.equals(
81+
Index([0, "a", 1, "b", 2, "c"])
8382
):
8483
idx1 = idx1.astype(str)
8584
idx2 = idx2.astype(str)
@@ -244,7 +243,7 @@ def test_union_base(self, index):
244243
index = index.unique()
245244

246245
# Mixed int string
247-
if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])):
246+
if index.equals(Index([0, "a", 1, "b", 2, "c"])):
248247
index = index.astype(str)
249248

250249
first = index[3:]
@@ -313,7 +312,7 @@ def test_symmetric_difference(self, index, using_infer_string, request):
313312
# index fixture has e.g. an index of bools that does not satisfy this,
314313
# another with [0, 0, 1, 1, 2, 2]
315314
pytest.skip("Index values no not satisfy test condition.")
316-
if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])):
315+
if index.equals(Index([0, "a", 1, "b", 2, "c"])):
317316
index = index.astype(str)
318317
first = index[1:]
319318
second = index[:-1]

0 commit comments

Comments
 (0)