def test_construction_from_string(self): result = CategoricalDtype.construct_from_string('category') self.assertTrue(is_dtype_equal(self.dtype, result)) self.assertRaises(TypeError, lambda : CategoricalDtype.construct_from_string('foo'))