Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
19 changes: 18 additions & 1 deletion pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ def __len__(self):
"uint": tm.makeUIntIndex(100),
"range": tm.makeRangeIndex(100),
"float": tm.makeFloatIndex(100),
"bool": tm.makeBoolIndex(2),
"bool": tm.makeBoolIndex(10),
"categorical": tm.makeCategoricalIndex(100),
"interval": tm.makeIntervalIndex(100),
"empty": Index([]),
Expand All @@ -978,6 +978,15 @@ def __len__(self):

@pytest.fixture(params=indices_dict.keys())
def indices(request):
"""
Fixture for many "simple" kinds of indices.

These indices are unlikely to cover corner cases, e.g.
- no names
- no NaTs/NaNs
- no values near implementation bounds
- ...
"""
# copy to avoid mutation, e.g. setting .name
return indices_dict[request.param].copy()

Expand All @@ -995,6 +1004,14 @@ def _create_series(index):
}


@pytest.fixture
def f8series_any_simple_index(indices):
"""
Fixture for tests on series with different types of indices.
"""
return _create_series(indices)


_narrow_dtypes = [
np.float16,
np.float32,
Expand Down
Loading