| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 StringIO | 6 import StringIO |
| 7 | 7 |
| 8 # Fixes include path. | 8 # Fixes include path. |
| 9 from super_mox import SuperMoxTestBase | 9 from super_mox import SuperMoxTestBase |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 def testMembersChanged(self): | 23 def testMembersChanged(self): |
| 24 members = [ | 24 members = [ |
| 25 'CheckCall', 'CheckCallError', 'CheckCallAndFilter', | 25 'CheckCall', 'CheckCallError', 'CheckCallAndFilter', |
| 26 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', | 26 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', |
| 27 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', | 27 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', |
| 28 'GetGClientRootAndEntries', 'GetNamedNodeText', 'MakeFileAutoFlush', | 28 'GetGClientRootAndEntries', 'GetNamedNodeText', 'MakeFileAutoFlush', |
| 29 'GetNodeNamedAttributeText', 'MakeFileAnnotated', 'PathDifference', | 29 'GetNodeNamedAttributeText', 'MakeFileAnnotated', 'PathDifference', |
| 30 'ParseXML', 'Popen', | 30 'ParseXML', 'Popen', |
| 31 'PrintableObject', 'RemoveDirectory', 'SoftClone', 'SplitUrlRevision', | 31 'PrintableObject', 'RemoveDirectory', 'SoftClone', 'SplitUrlRevision', |
| 32 'SyntaxErrorToError', 'WorkItem', | 32 'SyntaxErrorToError', 'WorkItem', |
| 33 'errno', 'logging', 'os', 'Queue', 're', 'stat', 'subprocess', | 33 'errno', 'hack_subprocess', 'logging', 'os', 'Queue', 're', 'stat', |
| 34 'sys','threading', 'time', 'xml', | 34 'subprocess', 'sys','threading', 'time', 'xml', |
| 35 ] | 35 ] |
| 36 # If this test fails, you should add the relevant test. | 36 # If this test fails, you should add the relevant test. |
| 37 self.compareMembers(gclient_utils, members) | 37 self.compareMembers(gclient_utils, members) |
| 38 | 38 |
| 39 | 39 |
| 40 class CheckCallTestCase(GclientUtilBase): | 40 class CheckCallTestCase(GclientUtilBase): |
| 41 def testCheckCallSuccess(self): | 41 def testCheckCallSuccess(self): |
| 42 args = ['boo', 'foo', 'bar'] | 42 args = ['boo', 'foo', 'bar'] |
| 43 process = self.mox.CreateMockAnything() | 43 process = self.mox.CreateMockAnything() |
| 44 process.returncode = 0 | 44 process.returncode = 0 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev)) | 176 out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev)) |
| 177 self.assertEquals(out_rev, rev) | 177 self.assertEquals(out_rev, rev) |
| 178 self.assertEquals(out_url, url) | 178 self.assertEquals(out_url, url) |
| 179 | 179 |
| 180 | 180 |
| 181 if __name__ == '__main__': | 181 if __name__ == '__main__': |
| 182 import unittest | 182 import unittest |
| 183 unittest.main() | 183 unittest.main() |
| 184 | 184 |
| 185 # vim: ts=2:sw=2:tw=80:et: | 185 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |