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

Side by Side Diff: tests/scm_unittest.py

Issue 6691034: First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tests/gcl_unittest.py ('k') | tests/trychange_unittest.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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """Unit tests for scm.py.""" 6 """Unit tests for scm.py."""
7 7
8 # pylint: disable=E1101,W0403 8 # pylint: disable=E1101,W0403
9 from __future__ import with_statement 9 from __future__ import with_statement
10 import logging 10 import logging
(...skipping 26 matching lines...) Expand all
37 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader') 37 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader')
38 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen') 38 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen')
39 39
40 40
41 class RootTestCase(BaseSCMTestCase): 41 class RootTestCase(BaseSCMTestCase):
42 def testMembersChanged(self): 42 def testMembersChanged(self):
43 self.mox.ReplayAll() 43 self.mox.ReplayAll()
44 members = [ 44 members = [
45 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail', 45 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail',
46 'cStringIO', 'determine_scm', 'gclient_utils', 'glob', 'logging', 'os', 46 'cStringIO', 'determine_scm', 'gclient_utils', 'glob', 'logging', 'os',
47 're', 'shutil', 'subprocess', 'sys', 'tempfile', 'time', 'xml', 47 're', 'shutil', 'subprocess', 'subprocess2', 'sys', 'tempfile', 'time',
48 'xml',
48 ] 49 ]
49 # If this test fails, you should add the relevant test. 50 # If this test fails, you should add the relevant test.
50 self.compareMembers(scm, members) 51 self.compareMembers(scm, members)
51 52
52 53
53 class GitWrapperTestCase(BaseSCMTestCase): 54 class GitWrapperTestCase(BaseSCMTestCase):
54 def testMembersChanged(self): 55 def testMembersChanged(self):
55 members = [ 56 members = [
56 'AssertVersion', 'Capture', 'CaptureStatus', 57 'AssertVersion', 'Capture', 'CaptureStatus',
57 'FetchUpstreamTuple', 58 'FetchUpstreamTuple',
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 # Asserting the tree is not sufficient, svn status must come out clear too. 328 # Asserting the tree is not sufficient, svn status must come out clear too.
328 self.assertEquals('', self._capture(['status'])) 329 self.assertEquals('', self._capture(['status']))
329 330
330 331
331 if __name__ == '__main__': 332 if __name__ == '__main__':
332 if '-v' in sys.argv: 333 if '-v' in sys.argv:
333 logging.basicConfig(level=logging.DEBUG) 334 logging.basicConfig(level=logging.DEBUG)
334 unittest.main() 335 unittest.main()
335 336
336 # vim: ts=2:sw=2:tw=80:et: 337 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « tests/gcl_unittest.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698