We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7479a5 commit a9e0538Copy full SHA for a9e0538
pandas/tests/dtypes/test_dtypes.py
@@ -86,6 +86,11 @@ def test_construction_from_string(self):
86
pytest.raises(
87
TypeError, lambda: CategoricalDtype.construct_from_string('foo'))
88
89
+ def test_constructor_invalid(self):
90
+ with tm.assert_raises_regex(TypeError,
91
+ "CategoricalIndex.* must be called"):
92
+ CategoricalDtype("category")
93
+
94
def test_is_dtype(self):
95
assert CategoricalDtype.is_dtype(self.dtype)
96
assert CategoricalDtype.is_dtype('category')
0 commit comments