Skip to content

Commit

Permalink
remove duplicated tesets
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhrks committed Nov 1, 2018
1 parent cbd9184 commit 4e49653
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 66 deletions.
22 changes: 0 additions & 22 deletions pandas/tests/indexes/datetimes/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,25 +603,3 @@ def test_get_loc_nat(self):
# GH#20464
index = DatetimeIndex(['1/3/2000', 'NaT'])
assert index.get_loc(pd.NaT) == 1

@pytest.mark.parametrize('ind1', [[True] * 5, pd.Index([True] * 5)])
@pytest.mark.parametrize('ind2', [[True, False, True, False, False],
pd.Index([True, False, True, False,
False])])
def test_getitem_bool_index_all(self, ind1, ind2):
# GH#22533
idx = pd.date_range('2011-01-01', '2011-01-05', freq='D', name='idx')
tm.assert_index_equal(idx[ind1], idx)

expected = pd.DatetimeIndex(['2011-01-01', '2011-01-03'], name='idx')
tm.assert_index_equal(idx[ind2], expected)

@pytest.mark.parametrize('ind1', [[True], pd.Index([True])])
@pytest.mark.parametrize('ind2', [[False], pd.Index([False])])
def test_getitem_bool_index_single(self, ind1, ind2):
# GH#22533
idx = pd.DatetimeIndex(['2011-01-01'], name='idx')
tm.assert_index_equal(idx[ind1], idx)

expected = pd.DatetimeIndex([], name='idx')
tm.assert_index_equal(idx[ind2], expected)
22 changes: 0 additions & 22 deletions pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,28 +718,6 @@ def test_getitem_error(self, indices, itm):
with pytest.raises(IndexError):
indices[itm]

@pytest.mark.parametrize('ind1', [[True] * 5, pd.Index([True] * 5)])
@pytest.mark.parametrize('ind2', [[True, False, True, False, False],
pd.Index([True, False, True, False,
False])])
def test_getitem_bool_index_all(self, ind1, ind2):
# GH#22533
idx = pd.Index(['a', 'b', 'c', 'd', 'e'], name='idx')
tm.assert_index_equal(idx[ind1], idx)

expected = pd.Index(['a', 'c'], name='idx')
tm.assert_index_equal(idx[ind2], expected)

@pytest.mark.parametrize('ind1', [[True], pd.Index([True])])
@pytest.mark.parametrize('ind2', [[False], pd.Index([False])])
def test_getitem_bool_index_single(self, ind1, ind2):
# GH#22533
idx = pd.Index(['a'], name='idx')
tm.assert_index_equal(idx[ind1], idx)

expected = pd.Index([], name='idx')
tm.assert_index_equal(idx[ind2], expected)

def test_intersection(self):
first = self.strIndex[:20]
second = self.strIndex[:10]
Expand Down
22 changes: 0 additions & 22 deletions pandas/tests/indexes/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,28 +839,6 @@ def test_join_outer(self):
tm.assert_numpy_array_equal(lidx, elidx)
tm.assert_numpy_array_equal(ridx, eridx)

@pytest.mark.parametrize('ind1', [[True] * 5, pd.Index([True] * 5)])
@pytest.mark.parametrize('ind2', [[True, False, True, False, False],
pd.Index([True, False, True, False,
False])])
def test_getitem_bool_index_all(self, ind1, ind2):
# GH#22533
idx = pd.Int64Index([1, 2, 3, 4, 5], name='idx')
tm.assert_index_equal(idx[ind1], idx)

expected = pd.Int64Index([1, 3], name='idx')
tm.assert_index_equal(idx[ind2], expected)

@pytest.mark.parametrize('ind1', [[True], pd.Index([True])])
@pytest.mark.parametrize('ind2', [[False], pd.Index([False])])
def test_getitem_bool_index_single(self, ind1, ind2):
# GH#22533
idx = pd.Int64Index([1], name='idx')
tm.assert_index_equal(idx[ind1], idx)

expected = pd.Int64Index([], name='idx')
tm.assert_index_equal(idx[ind2], expected)


class TestUInt64Index(NumericInt):

Expand Down

0 comments on commit 4e49653

Please sign in to comment.