MCPcopy
hub / github.com/pandas-dev/pandas / test_api_mi_raises

Function test_api_mi_raises

pandas/tests/strings/test_api.py:83–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82
83def test_api_mi_raises():
84 # GH 23679
85 mi = MultiIndex.from_arrays([["a", "b", "c"]])
86 msg = "Can only use .str accessor with Index, not MultiIndex"
87 with pytest.raises(AttributeError, match=msg):
88 mi.str
89 assert not hasattr(mi, "str")
90
91
92@pytest.mark.parametrize("dtype", [object, "category"])

Callers

nothing calls this directly

Calls 2

from_arraysMethod · 0.45
raisesMethod · 0.45

Tested by

no test coverage detected