Skip to content

Commit 6bab9d1

Browse files
jschendeljreback
authored andcommitted
CLN: Move test_intersect_str_dates (#17366)
Moves test_intersect_str_dates from tests/indexes/test_range.py to tests/indexes/test_base.py.
1 parent df2ebfc commit 6bab9d1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pandas/tests/indexes/test_base.py

+9
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,15 @@ def test_intersection(self):
663663
intersect = first.intersection(second)
664664
assert intersect.name is None
665665

666+
def test_intersect_str_dates(self):
667+
dt_dates = [datetime(2012, 2, 9), datetime(2012, 2, 22)]
668+
669+
i1 = Index(dt_dates, dtype=object)
670+
i2 = Index(['aa'], dtype=object)
671+
res = i2.intersection(i1)
672+
673+
assert len(res) == 0
674+
666675
def test_union(self):
667676
first = self.strIndex[5:20]
668677
second = self.strIndex[:10]

pandas/tests/indexes/test_range.py

-9
Original file line numberDiff line numberDiff line change
@@ -639,15 +639,6 @@ def test_intersection(self):
639639
expected = RangeIndex(0, 0, 1)
640640
tm.assert_index_equal(result, expected)
641641

642-
def test_intersect_str_dates(self):
643-
dt_dates = [datetime(2012, 2, 9), datetime(2012, 2, 22)]
644-
645-
i1 = Index(dt_dates, dtype=object)
646-
i2 = Index(['aa'], dtype=object)
647-
res = i2.intersection(i1)
648-
649-
assert len(res) == 0
650-
651642
def test_union_noncomparable(self):
652643
from datetime import datetime, timedelta
653644
# corner case, non-Int64Index

0 commit comments

Comments
 (0)