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

Side by Side Diff: tests/trychange_unittest.py

Issue 257023: Modify the output of gclient update, gclient status to only print out... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 2 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
« gclient_utils.py ('K') | « tests/gclient_scm_test.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) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 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 """Unit tests for trychange.py.""" 6 """Unit tests for trychange.py."""
7 7
8 import unittest 8 import unittest
9 9
10 # Local imports 10 # Local imports
11 import super_mox 11 import super_mox
12 import trychange 12 import trychange
13 from super_mox import mox 13 from super_mox import mox
14 14
15 15
16 class TryChangeTestsBase(super_mox.SuperMoxTestBase): 16 class TryChangeTestsBase(super_mox.SuperMoxTestBase):
17 """Setups and tear downs the mocks but doesn't test anything as-is.""" 17 """Setups and tear downs the mocks but doesn't test anything as-is."""
18 pass 18 pass
19 19
20 20
21 class TryChangeUnittest(TryChangeTestsBase): 21 class TryChangeUnittest(TryChangeTestsBase):
22 """General trychange.py tests.""" 22 """General trychange.py tests."""
23 def testMembersChanged(self): 23 def testMembersChanged(self):
24 members = [ 24 members = [
25 'EscapeDot', 'GIT', 'GetSourceRoot', 25 'EscapeDot', 'GIT', 'GetSourceRoot',
26 'GetTryServerSettings', 'GuessVCS', 26 'GetTryServerSettings', 'GuessVCS',
27 'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PathDifference', 27 'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PathDifference',
28 'RunCommand', 'SCM', 'SVN', 'TryChange', 'USAGE', 28 'RunCommand', 'SCM', 'SVN', 'TryChange', 'USAGE',
29 'datetime', 'gcl', 'gclient', 'gclient_scm', 'getpass', 'logging', 29 'datetime', 'gcl', 'gclient', 'gclient_scm', 'getpass', 'logging',
30 'optparse', 'os', 'shutil', 'socket', 'sys', 'tempfile', 'traceback', 30 'optparse', 'os', 'shutil', 'socket', 'subprocess', 'sys', 'tempfile',
31 'upload', 'urllib', 31 'traceback', 'upload', 'urllib',
32 ] 32 ]
33 # If this test fails, you should add the relevant test. 33 # If this test fails, you should add the relevant test.
34 self.compareMembers(trychange, members) 34 self.compareMembers(trychange, members)
35 35
36 36
37 class SVNUnittest(TryChangeTestsBase): 37 class SVNUnittest(TryChangeTestsBase):
38 """trychange.SVN tests.""" 38 """trychange.SVN tests."""
39 def testMembersChanged(self): 39 def testMembersChanged(self):
40 members = [ 40 members = [
41 'GenerateDiff', 'ProcessOptions', 'options' 41 'GenerateDiff', 'ProcessOptions', 'options'
42 ] 42 ]
43 # If this test fails, you should add the relevant test. 43 # If this test fails, you should add the relevant test.
44 self.compareMembers(trychange.SVN(None), members) 44 self.compareMembers(trychange.SVN(None), members)
45 45
46 46
47 class GITUnittest(TryChangeTestsBase): 47 class GITUnittest(TryChangeTestsBase):
48 """trychange.GIT tests.""" 48 """trychange.GIT tests."""
49 def testMembersChanged(self): 49 def testMembersChanged(self):
50 members = [ 50 members = [
51 'GenerateDiff', 'GetEmail', 'GetPatchName', 'ProcessOptions', 'options' 51 'GenerateDiff', 'GetEmail', 'GetPatchName', 'ProcessOptions', 'options'
52 ] 52 ]
53 # If this test fails, you should add the relevant test. 53 # If this test fails, you should add the relevant test.
54 self.compareMembers(trychange.GIT(None), members) 54 self.compareMembers(trychange.GIT(None), members)
55 55
56 56
57 if __name__ == '__main__': 57 if __name__ == '__main__':
58 unittest.main() 58 unittest.main()
OLDNEW
« gclient_utils.py ('K') | « tests/gclient_scm_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698