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

Method test_float_operation_default

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

Source from the content-addressed store, hash-verified

4128 test_containers(c, signal=FloatOperation)
4129
4130 def test_float_operation_default(self):
4131 Decimal = self.decimal.Decimal
4132 Context = self.decimal.Context
4133 Inexact = self.decimal.Inexact
4134 FloatOperation= self.decimal.FloatOperation
4135
4136 context = Context()
4137 self.assertFalse(context.flags[FloatOperation])
4138 self.assertFalse(context.traps[FloatOperation])
4139
4140 context.clear_traps()
4141 context.traps[Inexact] = True
4142 context.traps[FloatOperation] = True
4143 self.assertTrue(context.traps[FloatOperation])
4144 self.assertTrue(context.traps[Inexact])
4145
4146@requires_cdecimal
4147class CContextFlags(ContextFlags, unittest.TestCase):

Callers

nothing calls this directly

Calls 4

clear_trapsMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
ContextClass · 0.70

Tested by

no test coverage detected