MCPcopy Create free account
hub / github.com/ipython/traitlets / test_ctor_without_default_value

Method test_ctor_without_default_value

tests/test_traitlets_enum.py:131–137  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 example.color = value
130
131 def test_ctor_without_default_value(self):
132 # -- IMPLICIT: default_value = Color.red (first enum-value)
133 class Example2(HasTraits):
134 color = UseEnum(Color)
135
136 example = Example2()
137 self.assertEqual(example.color, Color.red)
138
139 def test_ctor_with_default_value_as_enum_value(self):
140 # -- CONVERT: number => Enum value (item)

Callers

nothing calls this directly

Calls 1

Example2Class · 0.85

Tested by

no test coverage detected