Skip to content

Commit

Permalink
CLN: Move test_intersect_str_dates (pandas-dev#17366)
Browse files Browse the repository at this point in the history
Moves test_intersect_str_dates from tests/indexes/test_range.py to tests/indexes/test_base.py.
  • Loading branch information
jschendel authored and alanbato committed Nov 10, 2017
1 parent bd5d681 commit fdb91e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 0 additions & 9 deletions pandas/tests/indexes/test_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fdb91e5

Please sign in to comment.