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

Method test_global_repr_keep

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

Source from the content-addressed store, hash-verified

4128
4129 @reraise_if_not_enum(HeadlightsK)
4130 def test_global_repr_keep(self):
4131 self.assertEqual(
4132 repr(HeadlightsK(0)),
4133 '%s.OFF_K' % SHORT_MODULE,
4134 )
4135 self.assertEqual(
4136 repr(HeadlightsK(2**0 + 2**2 + 2**3)),
4137 '%(m)s.LOW_BEAM_K|%(m)s.FOG_K|8' % {'m': SHORT_MODULE},
4138 )
4139 self.assertEqual(
4140 repr(HeadlightsK(2**3)),
4141 '%(m)s.HeadlightsK(8)' % {'m': SHORT_MODULE},
4142 )
4143
4144 @reraise_if_not_enum(HeadlightsC)
4145 def test_global_repr_conform1(self):

Callers

nothing calls this directly

Calls 2

HeadlightsKClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected