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

Unified Diff: tests/subprocess2_test.py

Issue 14643009: Don't discard stderr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Remove debugging print statements Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « subprocess2.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/subprocess2_test.py
diff --git a/tests/subprocess2_test.py b/tests/subprocess2_test.py
index 917e106af63bec3739f1e0b5bbc32fb081a04ef8..9d7df5bed2f715e22e7ba77e11911e93785acc2d 100755
--- a/tests/subprocess2_test.py
+++ b/tests/subprocess2_test.py
@@ -326,6 +326,14 @@ class RegressionTest(BaseTestCase):
self._check_res(res, None, None, 0)
self._run_test(fn)
+ def test_stderr(self):
+ cmd = ['expr', '1', '/', '0']
+ p1 = subprocess.Popen(cmd, stderr=subprocess.PIPE)
+ p2 = subprocess2.Popen(cmd, stderr=subprocess.PIPE)
+ r1 = p1.communicate()
+ r2 = p2.communicate(timeout=100)
+ self.assertEquals(r1, r2)
+
class S2Test(BaseTestCase):
# Tests that can only run in subprocess2, e.g. new functionalities.
« no previous file with comments | « subprocess2.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698