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

Method test_remainder

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

Source from the content-addressed store, hash-verified

3566 self.assertRaises(TypeError, c.quantize, 1, '2')
3567
3568 def test_remainder(self):
3569 Decimal = self.decimal.Decimal
3570 Context = self.decimal.Context
3571
3572 c = Context()
3573 d = c.remainder(Decimal(1), Decimal(2))
3574 self.assertEqual(c.remainder(1, 2), d)
3575 self.assertEqual(c.remainder(Decimal(1), 2), d)
3576 self.assertEqual(c.remainder(1, Decimal(2)), d)
3577 self.assertRaises(TypeError, c.remainder, '1', 2)
3578 self.assertRaises(TypeError, c.remainder, 1, '2')
3579
3580 def test_remainder_near(self):
3581 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