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

Method test_float_operation_default

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

Source from the content-addressed store, hash-verified

4129 test_containers(c, signal=FloatOperation)
4130
4131 def test_float_operation_default(self):
4132 Decimal = self.decimal.Decimal
4133 Context = self.decimal.Context
4134 Inexact = self.decimal.Inexact
4135 FloatOperation= self.decimal.FloatOperation
4136
4137 context = Context()
4138 self.assertFalse(context.flags[FloatOperation])
4139 self.assertFalse(context.traps[FloatOperation])
4140
4141 context.clear_traps()
4142 context.traps[Inexact] = True
4143 context.traps[FloatOperation] = True
4144 self.assertTrue(context.traps[FloatOperation])
4145 self.assertTrue(context.traps[Inexact])
4146
4147@requires_cdecimal
4148class 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