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

Method test_copy_abs

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

Source from the content-addressed store, hash-verified

3151 self.assertRaises(TypeError, c.compare_total_mag, 1, '1')
3152
3153 def test_copy_abs(self):
3154 Decimal = self.decimal.Decimal
3155 Context = self.decimal.Context
3156
3157 c = Context()
3158 d = c.copy_abs(Decimal(-1))
3159 self.assertEqual(c.copy_abs(-1), d)
3160 self.assertRaises(TypeError, c.copy_abs, '-1')
3161
3162 def test_copy_decimal(self):
3163 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected