Skip to content

Commit 6a6b8a8

Browse files
committed
split up pandas/tests/indexes/test_multi.py #18644
1 parent 36422a8 commit 6a6b8a8

21 files changed

+4570
-3329
lines changed

pandas/tests/indexes/multi/__init__.py

Whitespace-only changes.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import numpy as np
4+
import pytest
5+
from pandas import Index, MultiIndex
6+
7+
8+
@pytest.fixture
9+
def _index():
10+
major_axis = Index(['foo', 'bar', 'baz', 'qux'])
11+
minor_axis = Index(['one', 'two'])
12+
13+
major_labels = np.array([0, 0, 1, 2, 3, 3])
14+
minor_labels = np.array([0, 1, 0, 1, 0, 1])
15+
index_names = ['first', 'second']
16+
idx = MultiIndex(
17+
levels=[major_axis, minor_axis],
18+
labels=[major_labels, minor_labels],
19+
names=index_names,
20+
verify_integrity=False
21+
)
22+
return idx
23+
24+
25+
@pytest.fixture
26+
def named_index(_index):
27+
return {'index': _index}
28+
29+
30+
@pytest.fixture
31+
def index_names():
32+
return ['first', 'second']
33+
34+
35+
@pytest.fixture
36+
def _holder():
37+
return MultiIndex
38+
39+
40+
@pytest.fixture
41+
def _compat_props():
42+
return ['shape', 'ndim', 'size']

0 commit comments

Comments
 (0)