diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-05 02:40:17 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-05 02:40:17 +0100 |
| commit | 3737e600f444b230ef2284fa326443990903b25e (patch) | |
| tree | 7e3ecdcaabec00840460fc49480ff85c99300fda /Lib | |
| parent | 07ff16733ed4a2ec12ab2d331a970e9b8a44935e (diff) | |
| parent | 20f4bd4a043bded930c1c21befe28d9c79ea044b (diff) | |
| download | cpython-git-3737e600f444b230ef2284fa326443990903b25e.tar.gz | |
Merge 3.4 (test_subprocess)
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/test_subprocess.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 7000f8711f..cbdbb17e8f 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -2504,13 +2504,16 @@ class ContextManagerTests(BaseTestCase): def test_broken_pipe_cleanup(self): """Broken pipe error should not prevent wait() (Issue 21619)""" - proc = subprocess.Popen([sys.executable, "-c", - "import sys;" - "sys.stdin.close();" - "sys.stdout.close();" # Signals that input pipe is closed - ], stdin=subprocess.PIPE, stdout=subprocess.PIPE) + args = [sys.executable, "-c", + "import sys;" + "sys.stdin.close();" + "sys.stdout.close();"] # Signals that input pipe is closed + proc = subprocess.Popen(args, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + bufsize=support.PIPE_MAX_SIZE*2) proc.stdout.read() # Make sure subprocess has closed its input - proc.stdin.write(b"buffered data") + proc.stdin.write(b"x" * support.PIPE_MAX_SIZE) self.assertIsNone(proc.returncode) self.assertRaises(OSError, proc.__exit__, None, None, None) self.assertEqual(0, proc.returncode) |
