Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes.
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 5cd28f5..63a0508 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2880,7 +2880,7 @@
# The buffered IO layer must check for pending signal
# handlers, which in this case will invoke alarm_interrupt().
self.assertRaises(ZeroDivisionError,
- wio.write, item * (3 * 1000 * 1000))
+ wio.write, item * (support.PIPE_MAX_SIZE // len(item) + 1))
t.join()
# We got one byte, get another one and check that it isn't a
# repeat of the first one.
@@ -2978,7 +2978,7 @@
select = support.import_module("select")
# A quantity that exceeds the buffer size of an anonymous pipe's
# write end.
- N = 1024 * 1024
+ N = support.PIPE_MAX_SIZE
r, w = os.pipe()
fdopen_kwargs["closefd"] = False
# We need a separate thread to read from the pipe and allow the