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

Method test_plus

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

Source from the content-addressed store, hash-verified

3531 self.assertEqual(c.number_class(-45), c.number_class(Decimal(-45)))
3532
3533 def test_plus(self):
3534 Decimal = self.decimal.Decimal
3535 Context = self.decimal.Context
3536
3537 c = Context()
3538 d = c.plus(Decimal(10))
3539 self.assertEqual(c.plus(10), d)
3540 self.assertRaises(TypeError, c.plus, '10')
3541
3542 def test_power(self):
3543 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected