Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a04f4e0

Browse files
committed
Use @bigmemtest more accurately.
1 parent c93329b commit a04f4e0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_strtod.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,15 @@ def test_parsing(self):
248248
else:
249249
assert False, "expected ValueError"
250250

251-
@test.support.bigmemtest(size=5 * test.support._1G, memuse=1, dry_run=False)
251+
@test.support.bigmemtest(size=test.support._2G+10, memuse=4, dry_run=False)
252252
def test_oversized_digit_strings(self, maxsize):
253253
# Input string whose length doesn't fit in an INT.
254-
s = "1." + "1" * int(2.2e9)
254+
s = "1." + "1" * maxsize
255255
with self.assertRaises(ValueError):
256256
float(s)
257257
del s
258258

259-
s = "0." + "0" * int(2.2e9) + "1"
259+
s = "0." + "0" * maxsize + "1"
260260
with self.assertRaises(ValueError):
261261
float(s)
262262
del s

0 commit comments

Comments
 (0)