Skip to content

Commit 2dad231

Browse files
committed
Add failing test
1 parent 770fa13 commit 2dad231

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/integration/index_manipulation/test_integration_index_manipulation_ensure_index_is_multiindex.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
import pytest
1010

1111
from pandas_openscm.index_manipulation import ensure_index_is_multiindex
12-
from pandas_openscm.testing import create_test_df
12+
from pandas_openscm.testing import (
13+
convert_to_desired_type,
14+
create_test_df,
15+
)
1316

1417

1518
@pytest.mark.parametrize("copy, copy_exp", ((None, True), (True, True), (False, False)))
@@ -71,12 +74,17 @@ def test_ensure_index_is_multiindex_no_op(copy, copy_exp):
7174

7275

7376
@pytest.mark.parametrize("copy, copy_exp", ((None, True), (True, True), (False, False)))
74-
def test_accessor(setup_pandas_accessors, copy, copy_exp):
77+
@pytest.mark.parametrize(
78+
"pobj_type",
79+
("DataFrame", "Series"),
80+
)
81+
def test_accessor(setup_pandas_accessors, copy, copy_exp, pobj_type):
7582
start = pd.DataFrame(
7683
[[1, 2], [3, 4]],
7784
columns=[10, 20],
7885
index=pd.Index(["a", "b"], name="variable"),
7986
)
87+
start = convert_to_desired_type(start, pobj_type)
8088

8189
call_kwargs = {}
8290
if copy is not None:

0 commit comments

Comments
 (0)