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

Side by Side Diff: tests/gcl_unittest.py

Issue 385007: Run pychecker over most scripts in depot_tools. Catched a few bugs. (Closed)
Patch Set: . Created 11 years, 1 month 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription', 51 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription',
52 'GetModifiedFiles', 'GetRepositoryRoot', 52 'GetModifiedFiles', 'GetRepositoryRoot',
53 'GetSVNFileProperty', 'Help', 'IsSVNMoved', 53 'GetSVNFileProperty', 'Help', 'IsSVNMoved',
54 'Lint', 'LoadChangelistInfoForMultiple', 54 'Lint', 'LoadChangelistInfoForMultiple',
55 'MISSING_TEST_MSG', 'Opened', 'OptionallyDoPresubmitChecks', 55 'MISSING_TEST_MSG', 'Opened', 'OptionallyDoPresubmitChecks',
56 'PresubmitCL', 'ReadFile', 'REPOSITORY_ROOT', 'RunShell', 56 'PresubmitCL', 'ReadFile', 'REPOSITORY_ROOT', 'RunShell',
57 'RunShellWithReturnCode', 'SendToRietveld', 'TryChange', 57 'RunShellWithReturnCode', 'SendToRietveld', 'TryChange',
58 'UnknownFiles', 'UploadCL', 'Warn', 'WriteFile', 58 'UnknownFiles', 'UploadCL', 'Warn', 'WriteFile',
59 'gclient_scm', 'gclient_utils', 'getpass', 'main', 'os', 'random', 're', 59 'gclient_scm', 'gclient_utils', 'getpass', 'main', 'os', 'random', 're',
60 'shutil', 'string', 'subprocess', 'sys', 'tempfile', 60 'shutil', 'string', 'subprocess', 'sys', 'tempfile',
61 'upload', 'urllib2', 'xml', 61 'upload', 'urllib2',
62 ] 62 ]
63 # If this test fails, you should add the relevant test. 63 # If this test fails, you should add the relevant test.
64 self.compareMembers(gcl, members) 64 self.compareMembers(gcl, members)
65 65
66 def testIsSVNMoved(self): 66 def testIsSVNMoved(self):
67 # TODO(maruel): TEST ME 67 # TODO(maruel): TEST ME
68 pass 68 pass
69 69
70 def testGetSVNFileProperty(self): 70 def testGetSVNFileProperty(self):
71 # TODO(maruel): TEST ME 71 # TODO(maruel): TEST ME
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 gcl.os.chdir('somewhere') 358 gcl.os.chdir('somewhere')
359 self.mox.ReplayAll() 359 self.mox.ReplayAll()
360 360
361 gcl.UploadCL(change_info, args) 361 gcl.UploadCL(change_info, args)
362 self.assertEquals(change_info.issue, 1) 362 self.assertEquals(change_info.issue, 1)
363 self.assertEquals(change_info.patchset, 2) 363 self.assertEquals(change_info.patchset, 2)
364 364
365 365
366 if __name__ == '__main__': 366 if __name__ == '__main__':
367 unittest.main() 367 unittest.main()
OLDNEW
« gclient.py ('K') | « presubmit_support.py ('k') | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698