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

Method test_remainder

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

Source from the content-addressed store, hash-verified

3571 self.assertRaises(TypeError, c.quantize, 1, '2')
3572
3573 def test_remainder(self):
3574 Decimal = self.decimal.Decimal
3575 Context = self.decimal.Context
3576
3577 c = Context()
3578 d = c.remainder(Decimal(1), Decimal(2))
3579 self.assertEqual(c.remainder(1, 2), d)
3580 self.assertEqual(c.remainder(Decimal(1), 2), d)
3581 self.assertEqual(c.remainder(1, Decimal(2)), d)
3582 self.assertRaises(TypeError, c.remainder, '1', 2)
3583 self.assertRaises(TypeError, c.remainder, 1, '2')
3584
3585 def test_remainder_near(self):
3586 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

remainderMethod · 0.95
DecimalClass · 0.85
ContextClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected