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

Method test_divide_int

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

Source from the content-addressed store, hash-verified

3207 self.assertRaises(TypeError, c.divide, 1, '2')
3208
3209 def test_divide_int(self):
3210 Decimal = self.decimal.Decimal
3211 Context = self.decimal.Context
3212
3213 c = Context()
3214 d = c.divide_int(Decimal(1), Decimal(2))
3215 self.assertEqual(c.divide_int(1, 2), d)
3216 self.assertEqual(c.divide_int(Decimal(1), 2), d)
3217 self.assertEqual(c.divide_int(1, Decimal(2)), d)
3218 self.assertRaises(TypeError, c.divide_int, '1', 2)
3219 self.assertRaises(TypeError, c.divide_int, 1, '2')
3220
3221 def test_divmod(self):
3222 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