diff options
author | Stanislav Levin <slev@altlinux.org> | 2018-08-20 16:43:40 +0300 |
---|---|---|
committer | Stanislav Levin <slev@altlinux.org> | 2018-08-20 17:22:53 +0300 |
commit | 55a2e695e47abe7a4d5f5d3b79b8f0565aa72aa1 (patch) | |
tree | dc3dfbab309e002a744bf70bb4b64212ef362a97 | |
parent | ec0e234f0b9b7bcac11acb5ac545cff50085e372 (diff) | |
download | pexpect-55a2e695e47abe7a4d5f5d3b79b8f0565aa72aa1.tar.gz |
Fix "test_before_across_chunks" test
Pipe like "openssl rand -base64 2097152 | head -n 500" leads to "Broken pipe"
error on some systems. This is an unexpected behavior. So errors must be
suppressed.
Fixes: https://github.com/pexpect/pexpect/issues/523
-rwxr-xr-x | tests/test_expect.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_expect.py b/tests/test_expect.py index 795518a..2c74744 100755 --- a/tests/test_expect.py +++ b/tests/test_expect.py @@ -411,7 +411,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase): def test_before_across_chunks(self): # https://github.com/pexpect/pexpect/issues/478 child = pexpect.spawn( - '''/bin/bash -c "openssl rand -base64 {} | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2), + '''/bin/bash -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2), searchwindowsize=128 ) child.expect(['PATTERN']) |