Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ def nselect_method(request):
return request.param


@pytest.fixture(params=['left', 'right', 'both', 'neither'])
def closed(request):
"""
Fixture for trying all interval closed parameters
"""
return request.param


@pytest.fixture(params=[None, np.nan, pd.NaT, float('nan'), np.float('NaN')])
def nulls_fixture(request):
"""
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/indexes/interval/test_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
import pandas.util.testing as tm


@pytest.fixture(params=['left', 'right', 'both', 'neither'])
def closed(request):
return request.param


@pytest.fixture(params=[None, 'foo'])
def name(request):
return request.param
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/indexes/interval/test_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
import pandas as pd


@pytest.fixture(scope='class', params=['left', 'right', 'both', 'neither'])
def closed(request):
return request.param


@pytest.fixture(scope='class', params=[None, 'foo'])
def name(request):
return request.param
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/indexes/interval/test_interval_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
import pandas.util.testing as tm


@pytest.fixture(scope='class', params=['left', 'right', 'both', 'neither'])
def closed(request):
return request.param


@pytest.fixture(scope='class', params=[None, 'foo'])
def name(request):
return request.param
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/indexes/interval/test_interval_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
import pandas.util.testing as tm


@pytest.fixture(scope='class', params=['left', 'right', 'both', 'neither'])
def closed(request):
return request.param


@pytest.fixture(
scope='class', params=['int32', 'int64', 'float32', 'float64', 'uint64'])
def dtype(request):
Expand Down
5 changes: 1 addition & 4 deletions pandas/tests/indexing/interval/test_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pandas as pd

from pandas import Series, DataFrame, IntervalIndex, Interval
from pandas.compat import product
import pandas.util.testing as tm


Expand Down Expand Up @@ -51,9 +50,7 @@ def test_getitem_with_scalar(self):
tm.assert_series_equal(expected, s[s >= 2])

# TODO: check this behavior is consistent with test_interval_new.py
@pytest.mark.parametrize('direction, closed',
product(('increasing', 'decreasing'),
('left', 'right', 'neither', 'both')))
@pytest.mark.parametrize('direction', ['increasing', 'decreasing'])
def test_nonoverlapping_monotonic(self, direction, closed):
tpls = [(0, 1), (2, 3), (4, 5)]
if direction == 'decreasing':
Expand Down