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

Side by Side Diff: tests/gcl_unittest.py

Issue 119315: Add --force as a synonym for --no_presubmit as per Nicolas' request. (Closed)
Patch Set: Created 11 years, 6 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 unified diff | Download patch
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unit tests for gcl.py.""" 6 """Unit tests for gcl.py."""
7 7
8 import unittest 8 import unittest
9 9
10 # Local imports 10 # Local imports
(...skipping 24 matching lines...) Expand all
35 print diff 35 print diff
36 self.assertEqual(actual_members, expected_members) 36 self.assertEqual(actual_members, expected_members)
37 37
38 38
39 class GclUnittest(GclTestsBase): 39 class GclUnittest(GclTestsBase):
40 """General gcl.py tests.""" 40 """General gcl.py tests."""
41 def testMembersChanged(self): 41 def testMembersChanged(self):
42 members = [ 42 members = [
43 'CODEREVIEW_SETTINGS', 'CODEREVIEW_SETTINGS_FILE', 'CPP_EXTENSIONS', 43 'CODEREVIEW_SETTINGS', 'CODEREVIEW_SETTINGS_FILE', 'CPP_EXTENSIONS',
44 'Change', 'ChangeInfo', 'Changes', 'Commit', 'DoPresubmitChecks', 44 'Change', 'ChangeInfo', 'Changes', 'Commit', 'DoPresubmitChecks',
45 'ErrorExit', 'FILES_CACHE', 'GenerateChangeName', 'GenerateDiff', 45 'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenerateChangeName',
46 'GenerateDiff',
46 'GetCacheDir', 'GetCachedFile', 'GetChangesDir', 'GetCLs', 47 'GetCacheDir', 'GetCachedFile', 'GetChangesDir', 'GetCLs',
47 'GetChangelistInfoFile', 'GetCodeReviewSetting', 'GetEditor', 48 'GetChangelistInfoFile', 'GetCodeReviewSetting', 'GetEditor',
48 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription', 49 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription',
49 'GetModifiedFiles', 'GetRepositoryRoot', 50 'GetModifiedFiles', 'GetRepositoryRoot',
50 'GetSVNFileProperty', 'Help', 'IGNORE_PATHS', 'IsSVNMoved', 51 'GetSVNFileProperty', 'Help', 'IGNORE_PATHS', 'IsSVNMoved',
51 'Lint', 'LoadChangelistInfoForMultiple', 52 'Lint', 'LoadChangelistInfoForMultiple',
52 'MISSING_TEST_MSG', 'Opened', 'PresubmitCL', 'ReadFile', 53 'MISSING_TEST_MSG', 'Opened', 'OptionallyDoPresubmitChecks',
53 'REPOSITORY_ROOT', 'RunShell', 54 'PresubmitCL', 'ReadFile', 'REPOSITORY_ROOT', 'RunShell',
54 'RunShellWithReturnCode', 'SendToRietveld', 'TryChange', 55 'RunShellWithReturnCode', 'SendToRietveld', 'TryChange',
55 'UnknownFiles', 'UploadCL', 'Warn', 'WriteFile', 56 'UnknownFiles', 'UploadCL', 'Warn', 'WriteFile',
56 'gclient', 'getpass', 'main', 'os', 'random', 're', 57 'gclient', 'getpass', 'main', 'os', 'random', 're',
57 'shutil', 'string', 'subprocess', 'sys', 'tempfile', 58 'shutil', 'string', 'subprocess', 'sys', 'tempfile',
58 'upload', 'urllib2', 'xml', 59 'upload', 'urllib2', 'xml',
59 ] 60 ]
60 # If this test fails, you should add the relevant test. 61 # If this test fails, you should add the relevant test.
61 self.compareMembers(gcl, members) 62 self.compareMembers(gcl, members)
62 63
63 64
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 gcl.os.chdir('somewhere') 272 gcl.os.chdir('somewhere')
272 self.mox.ReplayAll() 273 self.mox.ReplayAll()
273 274
274 gcl.UploadCL(change_info, args) 275 gcl.UploadCL(change_info, args)
275 self.assertEquals(change_info.issue, 1) 276 self.assertEquals(change_info.issue, 1)
276 self.assertEquals(change_info.patchset, 2) 277 self.assertEquals(change_info.patchset, 2)
277 278
278 279
279 if __name__ == '__main__': 280 if __name__ == '__main__':
280 unittest.main() 281 unittest.main()
OLDNEW
« 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