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

Side by Side Diff: tests/trychange_unittest.py

Issue 6717025: Revert r79006: "Add code to 'fix' python encoding and it's unit test." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 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/presubmit_unittest.py ('k') | trychange.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/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 """Unit tests for trychange.py.""" 6 """Unit tests for trychange.py."""
7 7
8 # pylint: disable=E1103,W0403 8 # pylint: disable=E1103,W0403
9 9
10 # Fixes include path. 10 # Fixes include path.
(...skipping 27 matching lines...) Expand all
38 self.options.exclude = [] 38 self.options.exclude = []
39 39
40 40
41 class TryChangeUnittest(TryChangeTestsBase): 41 class TryChangeUnittest(TryChangeTestsBase):
42 """General trychange.py tests.""" 42 """General trychange.py tests."""
43 def testMembersChanged(self): 43 def testMembersChanged(self):
44 members = [ 44 members = [
45 'EPILOG', 'Escape', 'GIT', 'GuessVCS', 'GetMungedDiff', 'HELP_STRING', 45 'EPILOG', 'Escape', 'GIT', 'GuessVCS', 'GetMungedDiff', 'HELP_STRING',
46 'InvalidScript', 'NoTryServerAccess', 'PrintSuccess', 'SCM', 'SVN', 46 'InvalidScript', 'NoTryServerAccess', 'PrintSuccess', 'SCM', 'SVN',
47 'TryChange', 'USAGE', 47 'TryChange', 'USAGE',
48 'breakpad', 'datetime', 'errno', 'fix_encoding', 'gcl', 'gclient_utils', 48 'breakpad', 'datetime', 'errno', 'gcl', 'gclient_utils', 'getpass',
49 'getpass',
50 'json', 'logging', 'optparse', 'os', 'posixpath', 're', 'scm', 'shutil', 49 'json', 'logging', 'optparse', 'os', 'posixpath', 're', 'scm', 'shutil',
51 'sys', 'tempfile', 'urllib', 50 'sys', 'tempfile', 'urllib',
52 ] 51 ]
53 # If this test fails, you should add the relevant test. 52 # If this test fails, you should add the relevant test.
54 self.compareMembers(trychange, members) 53 self.compareMembers(trychange, members)
55 54
56 55
57 class SVNUnittest(TryChangeTestsBase): 56 class SVNUnittest(TryChangeTestsBase):
58 """trychange.SVN tests.""" 57 """trychange.SVN tests."""
59 def testMembersChanged(self): 58 def testMembersChanged(self):
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 self.mox.ReplayAll() 99 self.mox.ReplayAll()
101 git = trychange.GIT(self.options, self.fake_root) 100 git = trychange.GIT(self.options, self.fake_root)
102 self.assertEqual(git.GetFileNames(), self.expected_files) 101 self.assertEqual(git.GetFileNames(), self.expected_files)
103 self.assertEqual(git.checkout_root, self.fake_root) 102 self.assertEqual(git.checkout_root, self.fake_root)
104 self.assertEqual(git.GenerateDiff(), 'A diff') 103 self.assertEqual(git.GenerateDiff(), 'A diff')
105 104
106 105
107 if __name__ == '__main__': 106 if __name__ == '__main__':
108 import unittest 107 import unittest
109 unittest.main() 108 unittest.main()
OLDNEW
« no previous file with comments | « tests/presubmit_unittest.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698