OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-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 import re | 6 import re |
7 import StringIO | 7 import StringIO |
8 | 8 |
9 import gclient_utils | 9 import gclient_utils |
10 from super_mox import SuperMoxTestBase | 10 from super_mox import SuperMoxTestBase |
11 | 11 |
12 | 12 |
13 class GclientUtilsUnittest(SuperMoxTestBase): | 13 class GclientUtilsUnittest(SuperMoxTestBase): |
14 """General gclient_utils.py tests.""" | 14 """General gclient_utils.py tests.""" |
15 def testMembersChanged(self): | 15 def testMembersChanged(self): |
16 members = [ | 16 members = [ |
17 'CheckCall', 'CheckCallError', 'Error', 'FileRead', 'FileWrite', | 17 'CheckCall', 'CheckCallError', 'Error', 'FileRead', 'FileWrite', |
| 18 'FindGclientRoot', |
18 'FullUrlFromRelative', 'FullUrlFromRelative2', 'GetNamedNodeText', | 19 'FullUrlFromRelative', 'FullUrlFromRelative2', 'GetNamedNodeText', |
19 'GetNodeNamedAttributeText', 'IsUsingGit', 'ParseXML', | 20 'GetNodeNamedAttributeText', 'IsUsingGit', 'ParseXML', |
20 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision', | 21 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision', |
21 'SubprocessCall', 'SubprocessCallAndFilter', 'errno', 'os', 're', | 22 'SubprocessCall', 'SubprocessCallAndFilter', 'errno', 'os', 're', |
22 'stat', 'subprocess', 'sys', 'time', 'xml', | 23 'stat', 'subprocess', 'sys', 'time', 'xml', |
23 ] | 24 ] |
24 # If this test fails, you should add the relevant test. | 25 # If this test fails, you should add the relevant test. |
25 self.compareMembers(gclient_utils, members) | 26 self.compareMembers(gclient_utils, members) |
26 | 27 |
27 | 28 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 base_url = 'svn://a/b/c/d' | 148 base_url = 'svn://a/b/c/d' |
148 full_url = gclient_utils.FullUrlFromRelative2(base_url, '/crap') | 149 full_url = gclient_utils.FullUrlFromRelative2(base_url, '/crap') |
149 self.assertEqual(full_url, 'svn://a/b/c/crap') | 150 self.assertEqual(full_url, 'svn://a/b/c/crap') |
150 | 151 |
151 | 152 |
152 if __name__ == '__main__': | 153 if __name__ == '__main__': |
153 import unittest | 154 import unittest |
154 unittest.main() | 155 unittest.main() |
155 | 156 |
156 # vim: ts=2:sw=2:tw=80:et: | 157 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |