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

Method test_multiply

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

Source from the content-addressed store, hash-verified

3476 self.assertRaises(TypeError, c.minus, '10')
3477
3478 def test_multiply(self):
3479 Decimal = self.decimal.Decimal
3480 Context = self.decimal.Context
3481
3482 c = Context()
3483 d = c.multiply(Decimal(1), Decimal(2))
3484 self.assertEqual(c.multiply(1, 2), d)
3485 self.assertEqual(c.multiply(Decimal(1), 2), d)
3486 self.assertEqual(c.multiply(1, Decimal(2)), d)
3487 self.assertRaises(TypeError, c.multiply, '1', 2)
3488 self.assertRaises(TypeError, c.multiply, 1, '2')
3489
3490 def test_next_minus(self):
3491 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected