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

Side by Side Diff: tests/gclient_utils_test.py

Issue 10034011: Check the existence and executability of scm commands (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/gclient_scm_test.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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 import os 6 import os
7 import StringIO 7 import StringIO
8 import sys 8 import sys
9 9
10 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 10 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
(...skipping 12 matching lines...) Expand all
23 self.mox.StubOutWithMock(subprocess2, 'Popen') 23 self.mox.StubOutWithMock(subprocess2, 'Popen')
24 self.mox.StubOutWithMock(subprocess2, 'communicate') 24 self.mox.StubOutWithMock(subprocess2, 'communicate')
25 25
26 26
27 class GclientUtilsUnittest(GclientUtilBase): 27 class GclientUtilsUnittest(GclientUtilBase):
28 """General gclient_utils.py tests.""" 28 """General gclient_utils.py tests."""
29 def testMembersChanged(self): 29 def testMembersChanged(self):
30 members = [ 30 members = [
31 'Annotated', 'AutoFlush', 'CheckCallAndFilter', 31 'Annotated', 'AutoFlush', 'CheckCallAndFilter',
32 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', 32 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead',
33 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', 33 'FileWrite', 'FindCommandExecutable', 'FindFileUpwards',
34 'GetGClientRootAndEntries', 'GetEditor', 'IsDateRevision', 34 'FindGclientRoot', 'GetGClientRootAndEntries', 'GetEditor',
35 'MakeDateRevision', 'MakeFileAutoFlush', 'MakeFileAnnotated', 35 'IsDateRevision', 'MakeDateRevision', 'MakeFileAutoFlush',
36 'PathDifference', 'ParseCodereviewSettingsContent', 36 'MakeFileAnnotated', 'PathDifference', 'ParseCodereviewSettingsContent',
37 'PrintableObject', 'RemoveDirectory', 'RunEditor', 37 'PrintableObject', 'RemoveDirectory', 'RunEditor',
38 'SplitUrlRevision', 'SyntaxErrorToError', 38 'SplitUrlRevision', 'SyntaxErrorToError',
39 'UpgradeToHttps', 'Wrapper', 'WorkItem', 39 'UpgradeToHttps', 'Wrapper', 'WorkItem',
40 'errno', 'lockedmethod', 'logging', 'os', 'Queue', 're', 'rmtree', 40 'errno', 'lockedmethod', 'logging', 'os', 'Queue', 're', 'rmtree',
41 'safe_makedirs', 'stat', 'subprocess2', 'sys', 'tempfile', 'threading', 41 'safe_makedirs', 'stat', 'subprocess2', 'sys', 'tempfile', 'threading',
42 'time', 'urlparse', 42 'time', 'urlparse',
43 ] 43 ]
44 # If this test fails, you should add the relevant test. 44 # If this test fails, you should add the relevant test.
45 self.compareMembers(gclient_utils, members) 45 self.compareMembers(gclient_utils, members)
46 46
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 for content, expected in values: 211 for content, expected in values:
212 self.assertEquals( 212 self.assertEquals(
213 expected, gclient_utils.ParseCodereviewSettingsContent(content)) 213 expected, gclient_utils.ParseCodereviewSettingsContent(content))
214 214
215 215
216 if __name__ == '__main__': 216 if __name__ == '__main__':
217 import unittest 217 import unittest
218 unittest.main() 218 unittest.main()
219 219
220 # vim: ts=2:sw=2:tw=80:et: 220 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « tests/gclient_scm_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698