summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-04-24 21:33:20 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-04-24 21:33:20 (GMT)
commit34373b22523302202345007ee685cc833a2b10e0 (patch)
treecd2cd67dfc0c18b2cfa6cdca900470e355833559 /Lib/test/test_io.py
parent51460cc490f92ace44b3b2e4eecad5980537d317 (diff)
parente1a1674e1ed954c82cf1c88f3392baf4fd86ecdc (diff)
downloadcpython-34373b22523302202345007ee685cc833a2b10e0.zip
cpython-34373b22523302202345007ee685cc833a2b10e0.tar.gz
cpython-34373b22523302202345007ee685cc833a2b10e0.tar.bz2
Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index e5474f0..44e5cad 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -3069,7 +3069,7 @@ class SignalsTest(unittest.TestCase):
# The buffered IO layer must check for pending signal
# handlers, which in this case will invoke alarm_interrupt().
self.assertRaises(ZeroDivisionError,
- wio.write, item * (support.PIPE_MAX_SIZE // len(item)))
+ 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.
@@ -3168,7 +3168,7 @@ class SignalsTest(unittest.TestCase):
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