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

Unified Diff: tests/gcl_unittest.py

Issue 1619005: Allow the existence of ~/.gcl_upload_no_try override the default of try on up... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 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 | « gcl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gcl_unittest.py
===================================================================
--- tests/gcl_unittest.py (revision 43825)
+++ tests/gcl_unittest.py (working copy)
@@ -33,13 +33,13 @@
members = [
'CODEREVIEW_SETTINGS', 'CODEREVIEW_SETTINGS_FILE', 'Change',
'ChangeInfo', 'Changes', 'Commit', 'DEFAULT_LINT_IGNORE_REGEX',
- 'DEFAULT_LINT_REGEX', 'DeleteEmptyChangeLists', 'DoPresubmitChecks',
- 'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenerateChangeName',
- 'GenerateDiff', 'GetCLs', 'GetCacheDir', 'GetCachedFile',
- 'GetChangelistInfoFile', 'GetChangesDir', 'GetCodeReviewSetting',
- 'GetEditor', 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription',
- 'GetModifiedFiles', 'GetRepositoryRoot', 'Help', 'Lint',
- 'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG', 'Opened',
+ 'DEFAULT_LINT_REGEX', 'CheckHomeForFile', 'DeleteEmptyChangeLists',
+ 'DoPresubmitChecks', 'ErrorExit', 'FILES_CACHE', 'FilterFlag',
+ 'GenerateChangeName', 'GenerateDiff', 'GetCLs', 'GetCacheDir',
+ 'GetCachedFile', 'GetChangelistInfoFile', 'GetChangesDir',
+ 'GetCodeReviewSetting', 'GetEditor', 'GetFilesNotInCL', 'GetInfoDir',
+ 'GetIssueDescription', 'GetModifiedFiles', 'GetRepositoryRoot', 'Help',
+ 'Lint', 'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG', 'Opened',
'OptionallyDoPresubmitChecks', 'PresubmitCL', 'REPOSITORY_ROOT',
'RunShell', 'RunShellWithReturnCode', 'SVN',
'SendToRietveld', 'TryChange', 'UnknownFiles', 'UploadCL', 'Warn',
@@ -62,6 +62,10 @@
# TODO(maruel): TEST ME
pass
+ def testCheckHomeForFile(self):
+ # TODO(maruel): TEST ME
+ pass
+
def testGetRepositoryRootNone(self):
gcl.os.getcwd().AndReturn(self.fake_root_dir)
gcl.SVN.GetCheckoutRoot(self.fake_root_dir).AndReturn(None)
@@ -229,6 +233,7 @@
class UploadCLUnittest(GclTestsBase):
def setUp(self):
GclTestsBase.setUp(self)
+ self.mox.StubOutWithMock(gcl, 'CheckHomeForFile')
self.mox.StubOutWithMock(gcl, 'DoPresubmitChecks')
self.mox.StubOutWithMock(gcl, 'GenerateDiff')
self.mox.StubOutWithMock(gcl, 'GetCodeReviewSetting')
@@ -246,6 +251,7 @@
change_info.patch = None
files = [item[1] for item in change_info.files]
args = ['--foo=bar']
+ gcl.CheckHomeForFile('.gcl_upload_no_try').AndReturn(None)
gcl.DoPresubmitChecks(change_info, False, True).AndReturn(True)
gcl.GetCodeReviewSetting('CODE_REVIEW_SERVER').AndReturn('my_server')
gcl.os.getcwd().AndReturn('somewhere')
@@ -273,6 +279,7 @@
self.mox.StubOutWithMock(change_info, 'Save')
args = ['--server=a', '--no_watchlists']
change_info.Save()
+ gcl.CheckHomeForFile('.gcl_upload_no_try').AndReturn(None)
gcl.DoPresubmitChecks(change_info, False, True).AndReturn(True)
gcl.GetCodeReviewSetting('CODE_REVIEW_SERVER').AndReturn('my_server')
gcl.tempfile.mkstemp(text=True).AndReturn((42, 'descfile'))
@@ -327,6 +334,7 @@
self.mox.StubOutWithMock(change_info, 'Save')
args = ['--no_watchlists']
change_info.Save()
+ gcl.CheckHomeForFile('.gcl_upload_no_try').AndReturn(None)
gcl.DoPresubmitChecks(change_info, False, True).AndReturn(True)
gcl.GetCodeReviewSetting('CODE_REVIEW_SERVER').AndReturn('my_server')
gcl.tempfile.mkstemp(text=True).AndReturn((42, 'descfile'))
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698