OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 'Annotated', 'AutoFlush', 'CheckCallAndFilter', 'CommandToStr', | 31 'Annotated', 'AutoFlush', 'CheckCallAndFilter', 'CommandToStr', |
32 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', | 32 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', |
33 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', | 33 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', |
34 'GetGClientRootAndEntries', 'GetEditor', 'IsDateRevision', | 34 'GetGClientRootAndEntries', 'GetEditor', 'IsDateRevision', |
35 'MakeDateRevision', 'MakeFileAutoFlush', 'MakeFileAnnotated', | 35 'MakeDateRevision', 'MakeFileAutoFlush', 'MakeFileAnnotated', |
36 'PathDifference', 'ParseCodereviewSettingsContent', 'NumLocalCpus', | 36 'PathDifference', 'ParseCodereviewSettingsContent', 'NumLocalCpus', |
37 'PrintableObject', 'RunEditor', 'GCLIENT_CHILDREN', | 37 'PrintableObject', 'RunEditor', 'GCLIENT_CHILDREN', |
38 'GCLIENT_CHILDREN_LOCK', 'GClientChildren', | 38 'GCLIENT_CHILDREN_LOCK', 'GClientChildren', |
39 'SplitUrlRevision', 'SyntaxErrorToError', 'UpgradeToHttps', 'Wrapper', | 39 'SplitUrlRevision', 'SyntaxErrorToError', 'UpgradeToHttps', 'Wrapper', |
40 'WorkItem', 'codecs', 'lockedmethod', 'logging', 'os', 'pipes', 'Queue', | 40 'WorkItem', 'codecs', 'lockedmethod', 'logging', 'os', 'pipes', 'Queue', |
41 're', 'rmtree', 'safe_makedirs', 'stat', 'subprocess', 'subprocess2', | 41 're', 'rmtree', 'safe_makedirs', 'safe_rename', 'stat', 'subprocess', |
42 'sys', 'tempfile', 'threading', 'time', 'urlparse', | 42 'subprocess2', 'sys', 'tempfile', 'threading', '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 |
47 | 47 |
48 | 48 |
49 class CheckCallAndFilterTestCase(GclientUtilBase): | 49 class CheckCallAndFilterTestCase(GclientUtilBase): |
50 class ProcessIdMock(object): | 50 class ProcessIdMock(object): |
51 def __init__(self, test_string): | 51 def __init__(self, test_string): |
52 self.stdout = StringIO.StringIO(test_string) | 52 self.stdout = StringIO.StringIO(test_string) |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 for content, expected in values: | 212 for content, expected in values: |
213 self.assertEquals( | 213 self.assertEquals( |
214 expected, gclient_utils.ParseCodereviewSettingsContent(content)) | 214 expected, gclient_utils.ParseCodereviewSettingsContent(content)) |
215 | 215 |
216 | 216 |
217 if __name__ == '__main__': | 217 if __name__ == '__main__': |
218 import unittest | 218 import unittest |
219 unittest.main() | 219 unittest.main() |
220 | 220 |
221 # vim: ts=2:sw=2:tw=80:et: | 221 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |