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

Method test_implicit_context

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

Source from the content-addressed store, hash-verified

2300 self.assertIs(x.y, None)
2301
2302 def test_implicit_context(self):
2303 Decimal = self.decimal.Decimal
2304 getcontext = self.decimal.getcontext
2305
2306 # Check results when context given implicitly. (Issue 2478)
2307 c = getcontext()
2308 self.assertEqual(str(Decimal(0).sqrt()),
2309 str(c.sqrt(Decimal(0))))
2310
2311 def test_none_args(self):
2312 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

getcontextFunction · 0.85
strFunction · 0.85
DecimalClass · 0.85
assertEqualMethod · 0.45
sqrtMethod · 0.45

Tested by

no test coverage detected