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

Unified Diff: tests/presubmit_unittest.py

Issue 1923623004: Add --dry_run to presubmit_support. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix Created 4 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 | « 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 09aeb72ae940e83543c8c923ee35d1af34ed8ce8..ed57ffa05237d086c7a60d86ab6adbd983c3530f 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -1153,7 +1153,7 @@ def CheckChangeOnCommit(input_api, output_api):
presubmit.DoPresubmitChecks(mox.IgnoreArg(), False, False,
mox.IgnoreArg(),
mox.IgnoreArg(),
- None, False, None).AndReturn(output)
+ None, False, None, None).AndReturn(output)
self.mox.ReplayAll()
self.assertEquals(
@@ -1197,6 +1197,7 @@ class InputApiUnittest(PresubmitTestsBase):
'os_walk', 'os_path', 'os_stat', 'owners_db', 'pickle', 'platform',
'python_executable', 're', 'rietveld', 'subprocess', 'tbr', 'tempfile',
'time', 'traceback', 'unittest', 'urllib2', 'version', 'verbose',
+ 'dry_run',
]
# If this test fails, you should add the relevant test.
self.compareMembers(
@@ -1853,6 +1854,7 @@ class CannedChecksUnittest(PresubmitTestsBase):
input_api.host_url = 'http://localhost'
input_api.is_committing = committing
input_api.tbr = False
+ input_api.dry_run = None
input_api.python_executable = 'pyyyyython'
input_api.platform = sys.platform
input_api.cpu_count = 2
@@ -2642,7 +2644,7 @@ class CannedChecksUnittest(PresubmitTestsBase):
cq_dry_run=True,
rietveld_response=response,
reviewers=set(["ben@example.com"]),
- expected_output='This is a CQ dry run, skipping OWNERS check\n')
+ expected_output='This is a dry run, skipping OWNERS check\n')
self.AssertOwnersWorks(approvers=set(['ben@example.com']),
is_committing=False,
« 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