We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbad9a2 commit e36ddf6Copy full SHA for e36ddf6
1 file changed
Lib/test/test_io/test_bufferedio.py
@@ -634,7 +634,9 @@ def test_read1_error_does_not_cause_reentrant_failure(self):
634
635
with self.open(os_helper.TESTFN, "rb", buffering=0) as raw:
636
bufio = self.tp(raw, buffer_size=8)
637
- huge = 10**18
+ # 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
640
with self.assertRaises(MemoryError):
641
bufio.read1(huge)
642
0 commit comments