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

Method new_trait_class

tests/test_traitlets_enum.py:314–322  ·  view source on GitHub ↗
(case_sensitive, substring_matching)

Source from the content-addressed store, hash-verified

312
313 def test_assign_other_raises(self):
314 def new_trait_class(case_sensitive, substring_matching):
315 class Example(HasTraits):
316 color = FuzzyEnum(
317 color_choices,
318 case_sensitive=case_sensitive,
319 substring_matching=substring_matching,
320 )
321
322 return Example
323
324 example = new_trait_class(case_sensitive=False, substring_matching=False)()
325 with self.assertRaises(TraitError):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected