From 0309daeb778c0704bda7fa597135d33b3e1914ed Mon Sep 17 00:00:00 2001 From: jschendel Date: Tue, 29 Aug 2017 04:10:15 -0600 Subject: [PATCH] CLN: Move test_intersect_str_dates (#17366) Moves test_intersect_str_dates from tests/indexes/test_range.py to tests/indexes/test_base.py. --- pandas/tests/indexes/test_base.py | 9 +++++++++ pandas/tests/indexes/test_range.py | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index ef36e4a91aa1c..07e98c326bcaa 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -663,6 +663,15 @@ def test_intersection(self): intersect = first.intersection(second) assert intersect.name is None + def test_intersect_str_dates(self): + dt_dates = [datetime(2012, 2, 9), datetime(2012, 2, 22)] + + i1 = Index(dt_dates, dtype=object) + i2 = Index(['aa'], dtype=object) + res = i2.intersection(i1) + + assert len(res) == 0 + def test_union(self): first = self.strIndex[5:20] second = self.strIndex[:10] diff --git a/pandas/tests/indexes/test_range.py b/pandas/tests/indexes/test_range.py index 566354da4870d..5ecf467b57fc5 100644 --- a/pandas/tests/indexes/test_range.py +++ b/pandas/tests/indexes/test_range.py @@ -639,15 +639,6 @@ def test_intersection(self): expected = RangeIndex(0, 0, 1) tm.assert_index_equal(result, expected) - def test_intersect_str_dates(self): - dt_dates = [datetime(2012, 2, 9), datetime(2012, 2, 22)] - - i1 = Index(dt_dates, dtype=object) - i2 = Index(['aa'], dtype=object) - res = i2.intersection(i1) - - assert len(res) == 0 - def test_union_noncomparable(self): from datetime import datetime, timedelta # corner case, non-Int64Index