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

Method test_sqrt

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

Source from the content-addressed store, hash-verified

3607 self.assertRaises(TypeError, c.rotate, 1, '2')
3608
3609 def test_sqrt(self):
3610 Decimal = self.decimal.Decimal
3611 Context = self.decimal.Context
3612
3613 c = Context()
3614 d = c.sqrt(Decimal(10))
3615 self.assertEqual(c.sqrt(10), d)
3616 self.assertRaises(TypeError, c.sqrt, '10')
3617
3618 def test_same_quantum(self):
3619 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected