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

Method test_global_repr_conform1

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

Source from the content-addressed store, hash-verified

4143
4144 @reraise_if_not_enum(HeadlightsC)
4145 def test_global_repr_conform1(self):
4146 self.assertEqual(
4147 repr(HeadlightsC(0)),
4148 '%s.OFF_C' % SHORT_MODULE,
4149 )
4150 self.assertEqual(
4151 repr(HeadlightsC(2**0 + 2**2 + 2**3)),
4152 '%(m)s.LOW_BEAM_C|%(m)s.FOG_C' % {'m': SHORT_MODULE},
4153 )
4154 self.assertEqual(
4155 repr(HeadlightsC(2**3)),
4156 '%(m)s.OFF_C' % {'m': SHORT_MODULE},
4157 )
4158
4159 @reraise_if_not_enum(NoName)
4160 def test_global_enum_str(self):

Callers

nothing calls this directly

Calls 2

HeadlightsCClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected