Skip to content

Commit 91110f5

Browse files
committed
Use a larger amount of data for tests such as the interrupted_write
tests that depend on filling up an OS pipe so that they work properly on systems configured with large pipe buffers.
1 parent 620e875 commit 91110f5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Lib/subprocess.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class Popen(args, bufsize=0, executable=None,
166166
'/bin/ls'
167167
168168
check_output(*popenargs, **kwargs):
169-
Run command with arguments and return its output as a byte string.
169+
Run command with arguments and return its output.
170170
171171
If the exit code was non-zero it raises a CalledProcessError. The
172172
CalledProcessError object will have the return code in the returncode
@@ -547,7 +547,7 @@ def check_call(*popenargs, **kwargs):
547547

548548

549549
def check_output(*popenargs, timeout=None, **kwargs):
550-
r"""Run command with arguments and return its output as a byte string.
550+
r"""Run command with arguments and return its output.
551551
552552
If the exit code was non-zero it raises a CalledProcessError. The
553553
CalledProcessError object will have the return code in the returncode
@@ -565,6 +565,9 @@ def check_output(*popenargs, timeout=None, **kwargs):
565565
... "ls -l non_existent_file ; exit 0"],
566566
... stderr=STDOUT)
567567
b'ls: non_existent_file: No such file or directory\n'
568+
569+
If universal_newlines=True is passed, the return value will be a
570+
string rather than bytes.
568571
"""
569572
if 'stdout' in kwargs:
570573
raise ValueError('stdout argument not allowed, it will be overridden.')

Lib/test/support.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,9 @@ def _is_ipv6_enabled():
574574

575575

576576
# A constant likely larger than the underlying OS pipe buffer size.
577-
# Windows limit seems to be around 512B, and most Unix kernels have a 64K pipe
578-
# buffer size: take 1M to be sure.
579-
PIPE_MAX_SIZE = 1024 * 1024
577+
# Windows limit seems to be around 512B, and many Unix kernels have a 64K pipe
578+
# buffer size or 16*PAGE_SIZE: take a few megs to be sure. This
579+
PIPE_MAX_SIZE = 3 * 1000 * 1000
580580

581581

582582
# decorator for skipping tests on non-IEEE 754 platforms

0 commit comments

Comments
 (0)