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

Method test_divide_int

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

Source from the content-addressed store, hash-verified

3202 self.assertRaises(TypeError, c.divide, 1, '2')
3203
3204 def test_divide_int(self):
3205 Decimal = self.decimal.Decimal
3206 Context = self.decimal.Context
3207
3208 c = Context()
3209 d = c.divide_int(Decimal(1), Decimal(2))
3210 self.assertEqual(c.divide_int(1, 2), d)
3211 self.assertEqual(c.divide_int(Decimal(1), 2), d)
3212 self.assertEqual(c.divide_int(1, Decimal(2)), d)
3213 self.assertRaises(TypeError, c.divide_int, '1', 2)
3214 self.assertRaises(TypeError, c.divide_int, 1, '2')
3215
3216 def test_divmod(self):
3217 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected