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

Side by Side Diff: tests/gclient_utils_test.py

Issue 3107009: Move ExecutionQueue and WorkItem to gclient_utils.py (Closed)
Patch Set: Update unit test Created 10 years, 4 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') | 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/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
11 import gclient_utils 11 import gclient_utils
12 12
13 13
14 class GclientUtilsUnittest(SuperMoxTestBase): 14 class GclientUtilsUnittest(SuperMoxTestBase):
15 """General gclient_utils.py tests.""" 15 """General gclient_utils.py tests."""
16 def testMembersChanged(self): 16 def testMembersChanged(self):
17 members = [ 17 members = [
18 'CheckCall', 'CheckCallError', 'Error', 'FileRead', 'FileWrite', 18 'CheckCall', 'CheckCallError', 'Error', 'ExecutionQueue', 'FileRead',
19 'FindFileUpwards', 'FindGclientRoot', 'GetGClientRootAndEntries', 19 'FileWrite', 'FindFileUpwards', 'FindGclientRoot',
20 'GetNamedNodeText', 'GetNodeNamedAttributeText', 20 'GetGClientRootAndEntries', 'GetNamedNodeText',
21 'PathDifference', 'ParseXML', 'PrintableObject', 'RemoveDirectory', 21 'GetNodeNamedAttributeText', 'PathDifference', 'ParseXML',
22 'SplitUrlRevision', 'SubprocessCall', 'SubprocessCallAndFilter', 22 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision',
23 'SyntaxErrorToError', 23 'SubprocessCall', 'SubprocessCallAndFilter', 'SyntaxErrorToError',
24 'errno', 'logging', 'os', 're', 'stat', 'subprocess', 'sys', 'time', 24 'WorkItem',
25 'xml', 25 'errno', 'logging', 'os', 're', 'stat', 'subprocess', 'sys',
26 'threading', 'time', 'xml',
26 ] 27 ]
27 # If this test fails, you should add the relevant test. 28 # If this test fails, you should add the relevant test.
28 self.compareMembers(gclient_utils, members) 29 self.compareMembers(gclient_utils, members)
29 30
30 31
31 class CheckCallTestCase(SuperMoxTestBase): 32 class CheckCallTestCase(SuperMoxTestBase):
32 def testCheckCallSuccess(self): 33 def testCheckCallSuccess(self):
33 command = ['boo', 'foo', 'bar'] 34 command = ['boo', 'foo', 'bar']
34 process = self.mox.CreateMockAnything() 35 process = self.mox.CreateMockAnything()
35 process.returncode = 0 36 process.returncode = 0
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev)) 140 out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev))
140 self.assertEquals(out_rev, rev) 141 self.assertEquals(out_rev, rev)
141 self.assertEquals(out_url, url) 142 self.assertEquals(out_url, url)
142 143
143 144
144 if __name__ == '__main__': 145 if __name__ == '__main__':
145 import unittest 146 import unittest
146 unittest.main() 147 unittest.main()
147 148
148 # vim: ts=2:sw=2:tw=80:et: 149 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « gclient_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698