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

Side by Side Diff: tests/gclient_scm_test.py

Issue 6873110: Add --transitive flag. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: local switch to other directory 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 | « gclient_utils.py ('k') | tests/gclient_smoketest.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 gclient_scm.py.""" 6 """Unit tests for gclient_scm.py."""
7 7
8 # pylint: disable=E1101,E1103,W0403 8 # pylint: disable=E1101,E1103,W0403
9 9
10 # Import before super_mox to keep valid references. 10 # Import before super_mox to keep valid references.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 def Options(self, *args, **kwargs): 76 def Options(self, *args, **kwargs):
77 return self.OptionsObject(*args, **kwargs) 77 return self.OptionsObject(*args, **kwargs)
78 78
79 def setUp(self): 79 def setUp(self):
80 BaseTestCase.setUp(self) 80 BaseTestCase.setUp(self)
81 self.url = self.SvnUrl() 81 self.url = self.SvnUrl()
82 82
83 def testDir(self): 83 def testDir(self):
84 members = [ 84 members = [
85 'FullUrlForRelativeUrl', 'RunCommand', 85 'FullUrlForRelativeUrl', 'GetRevisionDate', 'RunCommand',
86 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert', 86 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
87 'revinfo', 'runhooks', 'status', 'update', 87 'revinfo', 'runhooks', 'status', 'update',
88 'updatesingle', 'url', 88 'updatesingle', 'url',
89 ] 89 ]
90 90
91 # If you add a member, be sure to add the relevant test! 91 # If you add a member, be sure to add the relevant test!
92 self.compareMembers(self._scm_wrapper('svn://a'), members) 92 self.compareMembers(self._scm_wrapper('svn://a'), members)
93 93
94 def testUnsupportedSCM(self): 94 def testUnsupportedSCM(self):
95 args = ['gopher://foo', self.root_dir, self.relpath] 95 args = ['gopher://foo', self.root_dir, self.relpath]
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 StdoutCheck.setUp(self) 536 StdoutCheck.setUp(self)
537 537
538 def tearDown(self): 538 def tearDown(self):
539 StdoutCheck.tearDown(self) 539 StdoutCheck.tearDown(self)
540 TestCaseUtils.tearDown(self) 540 TestCaseUtils.tearDown(self)
541 unittest.TestCase.tearDown(self) 541 unittest.TestCase.tearDown(self)
542 rmtree(self.root_dir) 542 rmtree(self.root_dir)
543 543
544 def testDir(self): 544 def testDir(self):
545 members = [ 545 members = [
546 'FullUrlForRelativeUrl', 'RunCommand', 546 'FullUrlForRelativeUrl', 'GetRevisionDate', 'RunCommand',
547 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert', 547 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
548 'revinfo', 'runhooks', 'status', 'update', 'url', 548 'revinfo', 'runhooks', 'status', 'update', 'url',
549 ] 549 ]
550 550
551 # If you add a member, be sure to add the relevant test! 551 # If you add a member, be sure to add the relevant test!
552 self.compareMembers(gclient_scm.CreateSCM(url=self.url), members) 552 self.compareMembers(gclient_scm.CreateSCM(url=self.url), members)
553 553
554 def testRevertMissing(self): 554 def testRevertMissing(self):
555 if not self.enabled: 555 if not self.enabled:
556 return 556 return
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 823
824 if __name__ == '__main__': 824 if __name__ == '__main__':
825 if '-v' in sys.argv: 825 if '-v' in sys.argv:
826 logging.basicConfig( 826 logging.basicConfig(
827 level=logging.DEBUG, 827 level=logging.DEBUG,
828 format='%(asctime).19s %(levelname)s %(filename)s:' 828 format='%(asctime).19s %(levelname)s %(filename)s:'
829 '%(lineno)s %(message)s') 829 '%(lineno)s %(message)s')
830 unittest.main() 830 unittest.main()
831 831
832 # vim: ts=2:sw=2:tw=80:et: 832 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « gclient_utils.py ('k') | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698