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

Function test_bigcomp

Modules/_decimal/tests/randfloat.py:113–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 yield s
112
113def test_bigcomp():
114 for ndigs in 5, 10, 14, 15, 16, 17, 18, 19, 20, 40, 41, 50:
115 dig10 = 10**ndigs
116 for i in range(100 * TEST_SIZE):
117 digits = random.randrange(dig10)
118 exponent = random.randrange(-400, 400)
119 s = '{}e{}'.format(digits, exponent)
120 yield s
121
122def test_parsing():
123 # make '0' more likely to be chosen than other digits

Callers 1

randfloat.pyFile · 0.85

Calls 2

randrangeMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…