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

Method test_underflow_boundary

Lib/test/test_strtod.py:195–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

193 e -= 1
194
195 def test_underflow_boundary(self):
196 # test values close to 2**-1075, the underflow boundary; similar
197 # to boundary_tests, except that the random error doesn't scale
198 # with n
199 for exponent in range(-400, -320):
200 base = 10**-exponent // 2**1075
201 for j in range(TEST_SIZE):
202 digits = base + random.randrange(-1000, 1000)
203 s = '{}e{}'.format(digits, exponent)
204 self.check_strtod(s)
205
206 def test_bigcomp(self):
207 for ndigs in 5, 10, 14, 15, 16, 17, 18, 19, 20, 40, 41, 50:

Callers

nothing calls this directly

Calls 3

check_strtodMethod · 0.95
randrangeMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected