Add subprocess2 unit tests

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6693078

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80454 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/subprocess2.py b/subprocess2.py
index c9057ac..f4a9a2f 100644
--- a/subprocess2.py
+++ b/subprocess2.py
@@ -233,9 +233,11 @@
   - Discards returncode.
   - Discards stderr. By default sets stderr=STDOUT.
   """
+  if kwargs.get('stdout') is None:
+    kwargs['stdout'] = PIPE
   if kwargs.get('stderr') is None:
     kwargs['stderr'] = STDOUT
-  return call(args, stdout=PIPE, **kwargs)[0][0]
+  return call(args, **kwargs)[0][0]
 
 
 def check_output(args, **kwargs):
@@ -247,6 +249,8 @@
   - Throws if return code is not 0.
   - Works even prior to python 2.7.
   """
+  if kwargs.get('stdout') is None:
+    kwargs['stdout'] = PIPE
   if kwargs.get('stderr') is None:
     kwargs['stderr'] = STDOUT
-  return check_call(args, stdout=PIPE, **kwargs)[0]
+  return check_call(args, **kwargs)[0]