mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
commit
016b9e38f7
2 changed files with 8 additions and 5 deletions
|
@ -166,7 +166,7 @@ getoutput(cmd):
|
||||||
'/bin/ls'
|
'/bin/ls'
|
||||||
|
|
||||||
check_output(*popenargs, **kwargs):
|
check_output(*popenargs, **kwargs):
|
||||||
Run command with arguments and return its output as a byte string.
|
Run command with arguments and return its output.
|
||||||
|
|
||||||
If the exit code was non-zero it raises a CalledProcessError. The
|
If the exit code was non-zero it raises a CalledProcessError. The
|
||||||
CalledProcessError object will have the return code in the returncode
|
CalledProcessError object will have the return code in the returncode
|
||||||
|
@ -545,7 +545,7 @@ def check_call(*popenargs, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def check_output(*popenargs, timeout=None, **kwargs):
|
def check_output(*popenargs, timeout=None, **kwargs):
|
||||||
r"""Run command with arguments and return its output as a byte string.
|
r"""Run command with arguments and return its output.
|
||||||
|
|
||||||
If the exit code was non-zero it raises a CalledProcessError. The
|
If the exit code was non-zero it raises a CalledProcessError. The
|
||||||
CalledProcessError object will have the return code in the returncode
|
CalledProcessError object will have the return code in the returncode
|
||||||
|
@ -563,6 +563,9 @@ def check_output(*popenargs, timeout=None, **kwargs):
|
||||||
... "ls -l non_existent_file ; exit 0"],
|
... "ls -l non_existent_file ; exit 0"],
|
||||||
... stderr=STDOUT)
|
... stderr=STDOUT)
|
||||||
b'ls: non_existent_file: No such file or directory\n'
|
b'ls: non_existent_file: No such file or directory\n'
|
||||||
|
|
||||||
|
If universal_newlines=True is passed, the return value will be a
|
||||||
|
string rather than bytes.
|
||||||
"""
|
"""
|
||||||
if 'stdout' in kwargs:
|
if 'stdout' in kwargs:
|
||||||
raise ValueError('stdout argument not allowed, it will be overridden.')
|
raise ValueError('stdout argument not allowed, it will be overridden.')
|
||||||
|
|
|
@ -576,9 +576,9 @@ IPV6_ENABLED = _is_ipv6_enabled()
|
||||||
|
|
||||||
|
|
||||||
# A constant likely larger than the underlying OS pipe buffer size.
|
# A constant likely larger than the underlying OS pipe buffer size.
|
||||||
# Windows limit seems to be around 512B, and most Unix kernels have a 64K pipe
|
# Windows limit seems to be around 512B, and many Unix kernels have a 64K pipe
|
||||||
# buffer size: take 1M to be sure.
|
# buffer size or 16*PAGE_SIZE: take a few megs to be sure. This
|
||||||
PIPE_MAX_SIZE = 1024 * 1024
|
PIPE_MAX_SIZE = 3 * 1000 * 1000
|
||||||
|
|
||||||
|
|
||||||
# decorator for skipping tests on non-IEEE 754 platforms
|
# decorator for skipping tests on non-IEEE 754 platforms
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue