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

Side by Side Diff: tests/gclient_utils_test.py

Issue 507072: Factor out PathDifference into gclient_utils for a later reuse. (Closed)
Patch Set: Created 10 years, 12 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
« no previous file with comments | « gclient_utils.py ('k') | trychange.py » ('j') | 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/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 'FindGclientRoot',
19 'FullUrlFromRelative', 'FullUrlFromRelative2', 'GetNamedNodeText', 19 'FullUrlFromRelative', 'FullUrlFromRelative2', 'GetNamedNodeText',
20 'GetNodeNamedAttributeText', 'IsUsingGit', 'ParseXML', 20 'GetNodeNamedAttributeText', 'IsUsingGit', 'PathDifference',
21 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision', 21 'ParseXML', 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision',
22 'SubprocessCall', 'SubprocessCallAndFilter', 'errno', 'os', 're', 22 'SubprocessCall', 'SubprocessCallAndFilter', 'errno', 'os', 're',
23 'stat', 'subprocess', 'sys', 'time', 'xml', 23 'stat', 'subprocess', 'sys', 'time', 'xml',
24 ] 24 ]
25 # If this test fails, you should add the relevant test. 25 # If this test fails, you should add the relevant test.
26 self.compareMembers(gclient_utils, members) 26 self.compareMembers(gclient_utils, members)
27 27
28 28
29 class CheckCallTestCase(SuperMoxTestBase): 29 class CheckCallTestCase(SuperMoxTestBase):
30 def testCheckCallSuccess(self): 30 def testCheckCallSuccess(self):
31 command = ['boo', 'foo', 'bar'] 31 command = ['boo', 'foo', 'bar']
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 base_url = 'svn://a/b/c/d' 148 base_url = 'svn://a/b/c/d'
149 full_url = gclient_utils.FullUrlFromRelative2(base_url, '/crap') 149 full_url = gclient_utils.FullUrlFromRelative2(base_url, '/crap')
150 self.assertEqual(full_url, 'svn://a/b/c/crap') 150 self.assertEqual(full_url, 'svn://a/b/c/crap')
151 151
152 152
153 if __name__ == '__main__': 153 if __name__ == '__main__':
154 import unittest 154 import unittest
155 unittest.main() 155 unittest.main()
156 156
157 # vim: ts=2:sw=2:tw=80:et: 157 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « gclient_utils.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698