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

Side by Side Diff: tests/git_cl_test.py

Issue 298703003: Upload project option (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 6 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') | third_party/upload.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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 git_cl.py.""" 6 """Unit tests for git_cl.py."""
7 7
8 import os 8 import os
9 import StringIO 9 import StringIO
10 import stat 10 import stat
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 return [ 204 return [
205 ((['git', 'config', 'core.editor'],), ''), 205 ((['git', 'config', 'core.editor'],), ''),
206 ] + cc_call + private_call + [ 206 ] + cc_call + private_call + [
207 ((['git', 'config', 'branch.master.base-url'],), ''), 207 ((['git', 'config', 'branch.master.base-url'],), ''),
208 ((['git', 208 ((['git',
209 'config', '--local', '--get-regexp', '^svn-remote\\.'],), 209 'config', '--local', '--get-regexp', '^svn-remote\\.'],),
210 (('', None), 0)), 210 (('', None), 0)),
211 ((['git', 'rev-parse', '--show-cdup'],), ''), 211 ((['git', 'rev-parse', '--show-cdup'],), ''),
212 ((['git', 'svn', 'info'],), ''), 212 ((['git', 'svn', 'info'],), ''),
213 ((['git', 'config', 'rietveld.project'],), ''),
213 ((['git', 214 ((['git',
214 'config', 'branch.master.rietveldissue', '1'],), ''), 215 'config', 'branch.master.rietveldissue', '1'],), ''),
215 ((['git', 'config', 'branch.master.rietveldserver', 216 ((['git', 'config', 'branch.master.rietveldserver',
216 'https://codereview.example.com'],), ''), 217 'https://codereview.example.com'],), ''),
217 ((['git', 218 ((['git',
218 'config', 'branch.master.rietveldpatchset', '2'],), ''), 219 'config', 'branch.master.rietveldpatchset', '2'],), ''),
219 ((['git', 'rev-parse', 'HEAD'],), 'hash'), 220 ((['git', 'rev-parse', 'HEAD'],), 'hash'),
220 ((['git', 'symbolic-ref', 'HEAD'],), 'hash'), 221 ((['git', 'symbolic-ref', 'HEAD'],), 'hash'),
221 ((['git', 222 ((['git',
222 'config', 'branch.hash.last-upload-hash', 'hash'],), ''), 223 'config', 'branch.hash.last-upload-hash', 'hash'],), ''),
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 ((['git', 'config', '--unset-all', 680 ((['git', 'config', '--unset-all',
680 'rietveld.tree-status-url'],), ''), 681 'rietveld.tree-status-url'],), ''),
681 ((['git', 'config', '--unset-all', 682 ((['git', 'config', '--unset-all',
682 'rietveld.viewvc-url'],), ''), 683 'rietveld.viewvc-url'],), ''),
683 ((['git', 'config', '--unset-all', 684 ((['git', 'config', '--unset-all',
684 'rietveld.bug-prefix'],), ''), 685 'rietveld.bug-prefix'],), ''),
685 ((['git', 'config', '--unset-all', 686 ((['git', 'config', '--unset-all',
686 'rietveld.cpplint-regex'],), ''), 687 'rietveld.cpplint-regex'],), ''),
687 ((['git', 'config', '--unset-all', 688 ((['git', 'config', '--unset-all',
688 'rietveld.cpplint-ignore-regex'],), ''), 689 'rietveld.cpplint-ignore-regex'],), ''),
690 ((['git', 'config', '--unset-all',
691 'rietveld.project'],), ''),
689 ((['git', 'config', 'gerrit.host', 692 ((['git', 'config', 'gerrit.host',
690 'gerrit.chromium.org'],), ''), 693 'gerrit.chromium.org'],), ''),
691 # DownloadHooks(False) 694 # DownloadHooks(False)
692 ((['git', 'config', 'gerrit.host'],), 695 ((['git', 'config', 'gerrit.host'],),
693 'gerrit.chromium.org'), 696 'gerrit.chromium.org'),
694 ((['git', 'rev-parse', '--show-cdup'],), ''), 697 ((['git', 'rev-parse', '--show-cdup'],), ''),
695 ((commit_msg_path, os.X_OK,), False), 698 ((commit_msg_path, os.X_OK,), False),
696 (('https://gerrit-review.googlesource.com/tools/hooks/commit-msg', 699 (('https://gerrit-review.googlesource.com/tools/hooks/commit-msg',
697 commit_msg_path,), ''), 700 commit_msg_path,), ''),
698 ((commit_msg_path,), True), 701 ((commit_msg_path,), True),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 obj = git_cl.ChangeDescription(orig) 748 obj = git_cl.ChangeDescription(orig)
746 obj.update_reviewers(reviewers) 749 obj.update_reviewers(reviewers)
747 actual.append(obj.description) 750 actual.append(obj.description)
748 self.assertEqual(expected, actual) 751 self.assertEqual(expected, actual)
749 752
750 753
751 if __name__ == '__main__': 754 if __name__ == '__main__':
752 git_cl.logging.basicConfig( 755 git_cl.logging.basicConfig(
753 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 756 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
754 unittest.main() 757 unittest.main()
OLDNEW
« no previous file with comments | « tests/gcl_unittest.py ('k') | third_party/upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698