Skip to content

Commit 016b9e3

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. Also a subprocess docstring update that i forgot was in my client when i did the original 3.3 commit... easier to just leave that in here with this one than go back and undo/redo.
2 parents eddb0a7 + 91110f5 commit 016b9e3

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
@@ -545,7 +545,7 @@ def check_call(*popenargs, **kwargs):
545545

546546

547547
def check_output(*popenargs, timeout=None, **kwargs):
548-
r"""Run command with arguments and return its output as a byte string.
548+
r"""Run command with arguments and return its output.
549549
550550
If the exit code was non-zero it raises a CalledProcessError. The
551551
CalledProcessError object will have the return code in the returncode
@@ -563,6 +563,9 @@ def check_output(*popenargs, timeout=None, **kwargs):
563563
... "ls -l non_existent_file ; exit 0"],
564564
... stderr=STDOUT)
565565
b'ls: non_existent_file: No such file or directory\n'
566+
567+
If universal_newlines=True is passed, the return value will be a
568+
string rather than bytes.
566569
"""
567570
if 'stdout' in kwargs:
568571
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
@@ -576,9 +576,9 @@ def _is_ipv6_enabled():
576576

577577

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

583583

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

0 commit comments

Comments
 (0)