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

Method test_divmod

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

Source from the content-addressed store, hash-verified

3214 self.assertRaises(TypeError, c.divide_int, 1, '2')
3215
3216 def test_divmod(self):
3217 Decimal = self.decimal.Decimal
3218 Context = self.decimal.Context
3219
3220 c = Context()
3221 d = c.divmod(Decimal(1), Decimal(2))
3222 self.assertEqual(c.divmod(1, 2), d)
3223 self.assertEqual(c.divmod(Decimal(1), 2), d)
3224 self.assertEqual(c.divmod(1, Decimal(2)), d)
3225 self.assertRaises(TypeError, c.divmod, '1', 2)
3226 self.assertRaises(TypeError, c.divmod, 1, '2')
3227
3228 def test_exp(self):
3229 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected