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

Side by Side Diff: tests/gclient_utils_test.py

Issue 3336015: Add the infrastructure necessary to support annotated stdout. (Closed)
Patch Set: add progress.update() Created 10 years, 3 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
(...skipping 11 matching lines...) Expand all
22 """General gclient_utils.py tests.""" 22 """General gclient_utils.py tests."""
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', 28 'GetGClientRootAndEntries', 'GetNamedNodeText',
29 'GetNodeNamedAttributeText', 'PathDifference', 'ParseXML', 'Popen', 29 'GetNodeNamedAttributeText', 'PathDifference', 'ParseXML', 'Popen',
30 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision', 30 'PrintableObject', 'RemoveDirectory', 'SplitUrlRevision',
31 'StdoutAutoFlush', 'SyntaxErrorToError', 'WorkItem', 31 'StdoutAutoFlush', 'SyntaxErrorToError', 'WorkItem',
32 'errno', 'logging', 'os', 're', 'stat', 'subprocess', 'sys', 32 'copy', 'errno', 'logging', 'os', 'Queue', 're', 'stat', 'subprocess',
33 'threading', 'time', 'xml', 33 'sys','threading', 'time', 'xml',
34 ] 34 ]
35 # If this test fails, you should add the relevant test. 35 # If this test fails, you should add the relevant test.
36 self.compareMembers(gclient_utils, members) 36 self.compareMembers(gclient_utils, members)
37 37
38 38
39 class CheckCallTestCase(GclientUtilBase): 39 class CheckCallTestCase(GclientUtilBase):
40 def testCheckCallSuccess(self): 40 def testCheckCallSuccess(self):
41 args = ['boo', 'foo', 'bar'] 41 args = ['boo', 'foo', 'bar']
42 process = self.mox.CreateMockAnything() 42 process = self.mox.CreateMockAnything()
43 process.returncode = 0 43 process.returncode = 0
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev)) 155 out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev))
156 self.assertEquals(out_rev, rev) 156 self.assertEquals(out_rev, rev)
157 self.assertEquals(out_url, url) 157 self.assertEquals(out_url, url)
158 158
159 159
160 if __name__ == '__main__': 160 if __name__ == '__main__':
161 import unittest 161 import unittest
162 unittest.main() 162 unittest.main()
163 163
164 # vim: ts=2:sw=2:tw=80:et: 164 # 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