MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_floatenum_fromhex

Method test_floatenum_fromhex

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

Source from the content-addressed store, hash-verified

1629
1630 @reraise_if_not_enum(FloatStooges)
1631 def test_floatenum_fromhex(self):
1632 h = float.hex(FloatStooges.MOE.value)
1633 self.assertIs(FloatStooges.fromhex(h), FloatStooges.MOE)
1634 h = float.hex(FloatStooges.MOE.value + 0.01)
1635 with self.assertRaises(ValueError):
1636 FloatStooges.fromhex(h)
1637
1638 def test_programmatic_function_type(self):
1639 MinorEnum = Enum('MinorEnum', 'june july august', type=int)

Callers

nothing calls this directly

Calls 4

hexMethod · 0.45
assertIsMethod · 0.45
fromhexMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected