def test_ctor_with_default_value_none_and_allow_none(self):
class Example2(HasTraits):
color1 = UseEnum(Color, default_value=None, allow_none=True)
color2 = UseEnum(Color, allow_none=True)
example = Example2()
self.assertIs(example.color1, None)
self.assertIs(example.color2, None)
评论列表
文章目录