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

Unified Diff: tests/git_cl_test.py

Issue 15025003: Add colors to git cl comments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix import Created 7 years, 7 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 | « git_cl.py ('k') | 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 bb907f2ccb203e8152f61f134c33e2b43f285a16..01c5b583c7054c8733ed8c2a2751c7e29a2c348c 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -455,23 +455,24 @@ class TestGitCl(TestCase):
def test_reviewer_send_mail_no_rev(self):
# Fails without a reviewer.
- class FileMock(object):
- buf = StringIO.StringIO()
- def write(self, content):
- self.buf.write(content)
-
- mock = FileMock()
+ stdout = StringIO.StringIO()
+ stderr = StringIO.StringIO()
try:
self.calls = self._upload_no_rev_calls(None, None)
def RunEditor(desc, _, **kwargs):
return desc
self.mock(git_cl.gclient_utils, 'RunEditor', RunEditor)
- self.mock(sys, 'stderr', mock)
+ self.mock(sys, 'stdout', stdout)
+ self.mock(sys, 'stderr', stderr)
git_cl.main(['upload', '--send-mail'])
self.fail()
except SystemExit:
- self.assertEquals(
- 'Must specify reviewers to send email.\n', mock.buf.getvalue())
+ self.assertEqual(
+ 'Using 50% similarity for rename/copy detection. Override with '
+ '--similarity.\n',
+ stdout.getvalue())
+ self.assertEqual(
+ 'Must specify reviewers to send email.\n', stderr.getvalue())
def test_dcommit(self):
self.calls = (
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698