Skip to content

Commit e36ddf6

Browse files
committed
Add comments of test case
1 parent fbad9a2 commit e36ddf6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_io/test_bufferedio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,9 @@ def test_read1_error_does_not_cause_reentrant_failure(self):
634634

635635
with self.open(os_helper.TESTFN, "rb", buffering=0) as raw:
636636
bufio = self.tp(raw, buffer_size=8)
637-
huge = 10**18
637+
# To request a size that is far too huge to ever be satisfied,
638+
# so that the internal buffer allocation reliably fails with MemoryError.
639+
huge = sys.maxsize // 2 + 1
638640
with self.assertRaises(MemoryError):
639641
bufio.read1(huge)
640642

0 commit comments

Comments
 (0)