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

Method test_copy_sign

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

Source from the content-addressed store, hash-verified

1622 self.assertRaises(InvalidOperation, op, x, y)
1623
1624 def test_copy_sign(self):
1625 Decimal = self.decimal.Decimal
1626
1627 d = Decimal(1).copy_sign(Decimal(-2))
1628 self.assertEqual(Decimal(1).copy_sign(-2), d)
1629 self.assertRaises(TypeError, Decimal(1).copy_sign, '-2')
1630
1631@requires_cdecimal
1632class CArithmeticOperatorsTest(ArithmeticOperatorsTest, unittest.TestCase):

Callers

nothing calls this directly

Calls 4

DecimalClass · 0.85
copy_signMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected