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

Side by Side Diff: tests/trychange_unittest.py

Issue 523094: Fix checkout root detection for git (Closed)
Patch Set: Created 10 years, 11 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 | « scm.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) 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 optparse 8 import optparse
9 9
10 # Local imports 10 # Local imports
(...skipping 25 matching lines...) Expand all
36 36
37 37
38 class TryChangeUnittest(TryChangeTestsBase): 38 class TryChangeUnittest(TryChangeTestsBase):
39 """General trychange.py tests.""" 39 """General trychange.py tests."""
40 def testMembersChanged(self): 40 def testMembersChanged(self):
41 members = [ 41 members = [
42 'EscapeDot', 'GIT', 'GuessVCS', 42 'EscapeDot', 'GIT', 'GuessVCS',
43 'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PrintSuccess', 43 'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PrintSuccess',
44 'SCM', 'SVN', 'TryChange', 'USAGE', 44 'SCM', 'SVN', 'TryChange', 'USAGE',
45 'breakpad', 'datetime', 'gclient_utils', 'getpass', 'logging', 45 'breakpad', 'datetime', 'gclient_utils', 'getpass', 'logging',
46 'optparse', 'os', 'posixpath', 'scm', 'shutil', 'socket', 46 'optparse', 'os', 'posixpath', 'scm', 'shutil', 'sys', 'tempfile',
47 'subprocess', 'sys', 'tempfile', 'urllib', 47 'urllib',
48 ] 48 ]
49 # If this test fails, you should add the relevant test. 49 # If this test fails, you should add the relevant test.
50 self.compareMembers(trychange, members) 50 self.compareMembers(trychange, members)
51 51
52 52
53 class SVNUnittest(TryChangeTestsBase): 53 class SVNUnittest(TryChangeTestsBase):
54 """trychange.SVN tests.""" 54 """trychange.SVN tests."""
55 def testMembersChanged(self): 55 def testMembersChanged(self):
56 members = [ 56 members = [
57 'AutomagicalSettings', 'GclStyleSettings', 'GclientStyleSettings', 57 'AutomagicalSettings', 'GclStyleSettings', 'GclientStyleSettings',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 self.mox.ReplayAll() 93 self.mox.ReplayAll()
94 git = trychange.GIT(self.options, self.fake_root) 94 git = trychange.GIT(self.options, self.fake_root)
95 self.assertEqual(git.GetFileNames(), self.expected_files) 95 self.assertEqual(git.GetFileNames(), self.expected_files)
96 self.assertEqual(git.GetLocalRoot(), self.fake_root) 96 self.assertEqual(git.GetLocalRoot(), self.fake_root)
97 self.assertEqual(git.GenerateDiff(), 'A diff') 97 self.assertEqual(git.GenerateDiff(), 'A diff')
98 98
99 99
100 if __name__ == '__main__': 100 if __name__ == '__main__':
101 import unittest 101 import unittest
102 unittest.main() 102 unittest.main()
OLDNEW
« no previous file with comments | « scm.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698