MCPcopy Index your code
hub / github.com/python/cpython / test_default_missing_no_chained_exception

Method test_default_missing_no_chained_exception

Lib/test/test_enum.py:2727–2737  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2725 self.assertEqual(LabelledList(1), LabelledList.unprocessed)
2726
2727 def test_default_missing_no_chained_exception(self):
2728 class Color(Enum):
2729 RED = 1
2730 GREEN = 2
2731 BLUE = 3
2732 try:
2733 Color(7)
2734 except ValueError as exc:
2735 self.assertTrue(exc.__context__ is None)
2736 else:
2737 raise Exception('Exception not raised.')
2738
2739 def test_missing_override(self):
2740 class Color(Enum):

Callers

nothing calls this directly

Calls 2

assertTrueMethod · 0.80
ColorClass · 0.70

Tested by

no test coverage detected