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

Unified Diff: tests/presubmit_unittest.py

Issue 3613007: Add a note warning the users that presubmit hooks will be run. (Closed)
Patch Set: move the print to inner function and update tests Created 10 years, 2 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 | « presubmit_support.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index eddae18e230c2198f53c0e641235aeb8aa9e837b..4a8ad588cc6c3dd89a565bf58daf10cefba98c02 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -341,6 +341,7 @@ class PresubmitUnittest(PresubmitTestsBase):
self.failIf(presubmit.DoPresubmitChecks(change, False, True, output, input,
None, False))
self.assertEqual(output.getvalue().count('!!'), 2)
+ self.checkstdout('Running presubmit hooks...\n')
def testDoPresubmitChecksPromptsAfterWarnings(self):
join = presubmit.os.path.join
@@ -379,6 +380,7 @@ class PresubmitUnittest(PresubmitTestsBase):
self.failUnless(presubmit.DoPresubmitChecks(change, False, True, output,
input, None, True))
self.assertEquals(output.getvalue().count('??'), 2)
+ self.checkstdout('Running presubmit hooks...\nRunning presubmit hooks...\n')
def testDoPresubmitChecksNoWarningPromptIfErrors(self):
join = presubmit.os.path.join
@@ -413,6 +415,7 @@ class PresubmitUnittest(PresubmitTestsBase):
self.assertEqual(output.getvalue().count('??'), 2)
self.assertEqual(output.getvalue().count('XX!!XX'), 2)
self.assertEqual(output.getvalue().count('(y/N)'), 0)
+ self.checkstdout('Running presubmit hooks...\n')
def testDoDefaultPresubmitChecksAndFeedback(self):
join = presubmit.os.path.join
@@ -452,6 +455,7 @@ def CheckChangeOnCommit(input_api, output_api):
'Was the presubmit check useful? Please send feedback & hate mail '
'to maruel@chromium.org!\n')
self.assertEquals(output.getvalue(), text)
+ self.checkstdout('Running presubmit hooks...\n')
def testDirectoryHandling(self):
files = [
@@ -523,6 +527,7 @@ def CheckChangeOnCommit(input_api, output_api):
'Running default presubmit script.\n'
'** Presubmit Messages **\n'
'http://tracker.com/42\n\n'))
+ self.checkstdout('Running presubmit hooks...\n')
def testGetTrySlavesExecuter(self):
self.mox.ReplayAll()
« no previous file with comments | « presubmit_support.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698