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

Unified Diff: tests/presubmit_unittest.py

Issue 1447463002: depot_tools: move some checks from commit to upload (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 1 month 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_canned_checks.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 d72b6b1e885c4f72298929c4970ac4f00a9d9630..2a90ab3c340d7dada9b6f5fd7590f9adc2787803 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -2896,6 +2896,13 @@ class CannedChecksUnittest(PresubmitTestsBase):
input_api.AffectedSourceFiles(mox.IgnoreArg()).AndReturn([affected_file])
input_api.ReadFile(affected_file).AndReturn('Hey!\nHo!\nHey!\nHo!\n\n')
+ input_api.AffectedSourceFiles(mox.IgnoreArg()).AndReturn([affected_file])
+
+ input_api.AffectedSourceFiles(mox.IgnoreArg()).AndReturn([affected_file])
+ input_api.ReadFile(affected_file, 'rb').AndReturn(
+ 'Hey!\nHo!\nHey!\nHo!\n\n')
+ affected_file.LocalPath()
+
self.mox.ReplayAll()
results = presubmit_canned_checks.PanProjectChecks(
input_api,
@@ -2905,7 +2912,7 @@ class CannedChecksUnittest(PresubmitTestsBase):
license_header=None,
project_name=None,
owners_check=False)
- self.assertEqual(1, len(results))
+ self.assertEqual(2, len(results))
self.assertEqual(
'Found line ending with white spaces in:', results[0]._message)
self.checkstdout('')
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698