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

Method test_sqrt

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

Source from the content-addressed store, hash-verified

3602 self.assertRaises(TypeError, c.rotate, 1, '2')
3603
3604 def test_sqrt(self):
3605 Decimal = self.decimal.Decimal
3606 Context = self.decimal.Context
3607
3608 c = Context()
3609 d = c.sqrt(Decimal(10))
3610 self.assertEqual(c.sqrt(10), d)
3611 self.assertRaises(TypeError, c.sqrt, '10')
3612
3613 def test_same_quantum(self):
3614 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