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

Method test_copy_negate

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

Source from the content-addressed store, hash-verified

3169 self.assertRaises(TypeError, c.copy_decimal, '-1')
3170
3171 def test_copy_negate(self):
3172 Decimal = self.decimal.Decimal
3173 Context = self.decimal.Context
3174
3175 c = Context()
3176 d = c.copy_negate(Decimal(-1))
3177 self.assertEqual(c.copy_negate(-1), d)
3178 self.assertRaises(TypeError, c.copy_negate, '-1')
3179
3180 def test_copy_sign(self):
3181 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected