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

Side by Side Diff: tests/gcl_unittest.py

Issue 160139: Get rid of annoying empty changelists!... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: s/clear/delete Created 11 years, 4 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 | Annotate | Revision Log
« 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 23 matching lines...) Expand all
34 self.mox.StubOutWithMock(gcl, 'ReadFile') 34 self.mox.StubOutWithMock(gcl, 'ReadFile')
35 self.mox.StubOutWithMock(gcl, 'WriteFile') 35 self.mox.StubOutWithMock(gcl, 'WriteFile')
36 36
37 37
38 class GclUnittest(GclTestsBase): 38 class GclUnittest(GclTestsBase):
39 """General gcl.py tests.""" 39 """General gcl.py tests."""
40 def testMembersChanged(self): 40 def testMembersChanged(self):
41 self.mox.ReplayAll() 41 self.mox.ReplayAll()
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', 'DeleteEmptyChangeLists', 'Commit',
45 'DoPresubmitChecks',
45 'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenerateChangeName', 46 'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenerateChangeName',
46 'GenerateDiff', 47 'GenerateDiff',
47 'GetCacheDir', 'GetCachedFile', 'GetChangesDir', 'GetCLs', 48 'GetCacheDir', 'GetCachedFile', 'GetChangesDir', 'GetCLs',
48 'GetChangelistInfoFile', 'GetCodeReviewSetting', 'GetEditor', 49 'GetChangelistInfoFile', 'GetCodeReviewSetting', 'GetEditor',
49 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription', 50 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription',
50 'GetModifiedFiles', 'GetRepositoryRoot', 51 'GetModifiedFiles', 'GetRepositoryRoot',
51 'GetSVNFileProperty', 'Help', 'IGNORE_PATHS', 'IsSVNMoved', 52 'GetSVNFileProperty', 'Help', 'IGNORE_PATHS', 'IsSVNMoved',
52 'Lint', 'LoadChangelistInfoForMultiple', 53 'Lint', 'LoadChangelistInfoForMultiple',
53 'MISSING_TEST_MSG', 'Opened', 'OptionallyDoPresubmitChecks', 54 'MISSING_TEST_MSG', 'Opened', 'OptionallyDoPresubmitChecks',
54 'PresubmitCL', 'ReadFile', 'REPOSITORY_ROOT', 'RunShell', 55 'PresubmitCL', 'ReadFile', 'REPOSITORY_ROOT', 'RunShell',
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 gcl.os.chdir('somewhere') 356 gcl.os.chdir('somewhere')
356 self.mox.ReplayAll() 357 self.mox.ReplayAll()
357 358
358 gcl.UploadCL(change_info, args) 359 gcl.UploadCL(change_info, args)
359 self.assertEquals(change_info.issue, 1) 360 self.assertEquals(change_info.issue, 1)
360 self.assertEquals(change_info.patchset, 2) 361 self.assertEquals(change_info.patchset, 2)
361 362
362 363
363 if __name__ == '__main__': 364 if __name__ == '__main__':
364 unittest.main() 365 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