Skip to content

Commit a9e0538

Browse files
committed
fixup! ENH: Parametrized CategoricalDtype
1 parent d7479a5 commit a9e0538

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/dtypes/test_dtypes.py

+5
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ def test_construction_from_string(self):
8686
pytest.raises(
8787
TypeError, lambda: CategoricalDtype.construct_from_string('foo'))
8888

89+
def test_constructor_invalid(self):
90+
with tm.assert_raises_regex(TypeError,
91+
"CategoricalIndex.* must be called"):
92+
CategoricalDtype("category")
93+
8994
def test_is_dtype(self):
9095
assert CategoricalDtype.is_dtype(self.dtype)
9196
assert CategoricalDtype.is_dtype('category')

0 commit comments

Comments
 (0)