Skip to content

Commit 61e98b3

Browse files
committed
extra test
1 parent 4f7b277 commit 61e98b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/indexes/test_multi_indexes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
check,
1010
)
1111
from tests._typing import (
12+
np_1darray_bool,
1213
np_1darray_int8,
1314
np_1darray_intp,
1415
)
@@ -88,3 +89,10 @@ def test_multiindex_equal_levels() -> None:
8889
mi2 = pd.MultiIndex.from_arrays([[1, 2, 3, 1], [4, 5, 6, 4]])
8990
eq = mi.equal_levels(mi2)
9091
check(assert_type(eq, bool), bool)
92+
93+
94+
def test_multiindex_get_loc_level() -> None:
95+
mi = pd.MultiIndex.from_arrays([[1, 2, 3, 1], [4, 5, 6, 4]])
96+
res_0, res_1 = mi.get_loc_level(1, level=0)
97+
check(assert_type(res_0, int | slice | np_1darray_bool), np_1darray_bool)
98+
check(assert_type(res_1, pd.Index), pd.Index)

0 commit comments

Comments
 (0)