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

Unified Diff: tests/git_cl_test.py

Issue 2055003003: Mock stdout to avoid pollutting test runner stdout. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 3561edc2e00b46755b02feb9e5240e840b48a5dd..b0048a11d9cee39d22648e9d50a92e752cdc4e6f 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1507,6 +1507,8 @@ class TestGitCl(TestCase):
self.assertEqual('hi\n\t there\n\nman', ChangelistMock.desc)
def test_archive(self):
+ self.mock(git_cl.sys, 'stdout', StringIO.StringIO())
+
self.calls = \
[((['git', 'for-each-ref', '--format=%(refname)', 'refs/heads'],),
'refs/heads/master\nrefs/heads/foo\nrefs/heads/bar'),
@@ -1541,6 +1543,7 @@ class TestGitCl(TestCase):
self.assertEqual(0, git_cl.main(['archive', '-f']))
def test_archive_current_branch_fails(self):
+ self.mock(git_cl.sys, 'stdout', StringIO.StringIO())
self.calls = \
[((['git', 'for-each-ref', '--format=%(refname)', 'refs/heads'],),
'refs/heads/master'),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698