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

Side by Side Diff: tests/gcl_unittest.py

Issue 164084: Add all modified files to new changelists by default. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: '' 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
« gcl.py ('K') | « 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 class ChangeInfoUnittest(GclTestsBase): 170 class ChangeInfoUnittest(GclTestsBase):
171 def setUp(self): 171 def setUp(self):
172 GclTestsBase.setUp(self) 172 GclTestsBase.setUp(self)
173 self.mox.StubOutWithMock(gcl, 'GetChangelistInfoFile') 173 self.mox.StubOutWithMock(gcl, 'GetChangelistInfoFile')
174 self.mox.StubOutWithMock(gcl, 'GetRepositoryRoot') 174 self.mox.StubOutWithMock(gcl, 'GetRepositoryRoot')
175 175
176 def testChangeInfoMembers(self): 176 def testChangeInfoMembers(self):
177 self.mox.ReplayAll() 177 self.mox.ReplayAll()
178 members = [ 178 members = [
179 'CloseIssue', 'Delete', 'GetFiles', 'GetFileNames', 'GetLocalRoot', 179 'CloseIssue', 'Delete', 'GetFiles', 'GetFileNames', 'GetLocalRoot',
180 'Load', 'MissingTests', 'Save', 'UpdateRietveldDescription', 180 'Exists', 'Load', 'MissingTests', 'Save', 'UpdateRietveldDescription',
181 'description', 'issue', 'name', 181 'description', 'issue', 'name',
182 'patch', 'patchset', 182 'patch', 'patchset',
183 ] 183 ]
184 # If this test fails, you should add the relevant test. 184 # If this test fails, you should add the relevant test.
185 self.compareMembers(gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir), 185 self.compareMembers(gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir),
186 members) 186 members)
187 187
188 def testChangeInfoBase(self): 188 def testChangeInfoBase(self):
189 files = [('M', 'foo'), ('A', 'bar')] 189 files = [('M', 'foo'), ('A', 'bar')]
190 self.mox.ReplayAll() 190 self.mox.ReplayAll()
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 gcl.os.chdir('somewhere') 356 gcl.os.chdir('somewhere')
357 self.mox.ReplayAll() 357 self.mox.ReplayAll()
358 358
359 gcl.UploadCL(change_info, args) 359 gcl.UploadCL(change_info, args)
360 self.assertEquals(change_info.issue, 1) 360 self.assertEquals(change_info.issue, 1)
361 self.assertEquals(change_info.patchset, 2) 361 self.assertEquals(change_info.patchset, 2)
362 362
363 363
364 if __name__ == '__main__': 364 if __name__ == '__main__':
365 unittest.main() 365 unittest.main()
OLDNEW
« gcl.py ('K') | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698