Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: subprocess2.py

Issue 8722001: Improve testing by comparing behavior of subprocess to subprocess2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: PYLINTTTTTTTTTT! Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/subprocess2_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding=utf8 1 # coding=utf8
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Collection of subprocess wrapper functions. 5 """Collection of subprocess wrapper functions.
6 6
7 In theory you shouldn't need anything else in subprocess, or this module failed. 7 In theory you shouldn't need anything else in subprocess, or this module failed.
8 """ 8 """
9 9
10 from __future__ import with_statement 10 from __future__ import with_statement
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 """Emulates subprocess.check_output(). 303 """Emulates subprocess.check_output().
304 304
305 Captures stdout of a process call and returns stdout only. 305 Captures stdout of a process call and returns stdout only.
306 306
307 - Throws if return code is not 0. 307 - Throws if return code is not 0.
308 - Works even prior to python 2.7. 308 - Works even prior to python 2.7.
309 - Blocks stdin by default if not specified since no output will be visible. 309 - Blocks stdin by default if not specified since no output will be visible.
310 - As per doc, "The stdout argument is not allowed as it is used internally." 310 - As per doc, "The stdout argument is not allowed as it is used internally."
311 """ 311 """
312 kwargs.setdefault('stdin', VOID) 312 kwargs.setdefault('stdin', VOID)
313 if 'stdout' in kwargs:
314 raise ValueError('stdout argument not allowed, it will be overridden.')
313 return check_call_out(args, stdout=PIPE, **kwargs)[0] 315 return check_call_out(args, stdout=PIPE, **kwargs)[0]
OLDNEW
« no previous file with comments | « no previous file | tests/subprocess2_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698