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

Method test_none_args

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

Source from the content-addressed store, hash-verified

2974class ContextAPItests:
2975
2976 def test_none_args(self):
2977 Context = self.decimal.Context
2978 InvalidOperation = self.decimal.InvalidOperation
2979 DivisionByZero = self.decimal.DivisionByZero
2980 Overflow = self.decimal.Overflow
2981
2982 c1 = Context()
2983 c2 = Context(prec=None, rounding=None, Emax=None, Emin=None,
2984 capitals=None, clamp=None, flags=None, traps=None)
2985 for c in [c1, c2]:
2986 self.assertEqual(c.prec, 28)
2987 self.assertEqual(c.rounding, ROUND_HALF_EVEN)
2988 self.assertEqual(c.Emax, 999999)
2989 self.assertEqual(c.Emin, -999999)
2990 self.assertEqual(c.capitals, 1)
2991 self.assertEqual(c.clamp, 0)
2992 assert_signals(self, c, 'flags', [])
2993 assert_signals(self, c, 'traps', [InvalidOperation, DivisionByZero,
2994 Overflow])
2995
2996 def test_pickle(self):
2997

Callers

nothing calls this directly

Calls 3

assert_signalsFunction · 0.85
ContextClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected