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

Method test_copy_sign

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

Source from the content-addressed store, hash-verified

1627 self.assertRaises(InvalidOperation, op, x, y)
1628
1629 def test_copy_sign(self):
1630 Decimal = self.decimal.Decimal
1631
1632 d = Decimal(1).copy_sign(Decimal(-2))
1633 self.assertEqual(Decimal(1).copy_sign(-2), d)
1634 self.assertRaises(TypeError, Decimal(1).copy_sign, '-2')
1635
1636@requires_cdecimal
1637class 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