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

Side by Side Diff: tests/git_cl_test.py

Issue 271703010: use canonical base URL for projects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix indent Created 6 years, 7 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 | « git_cl.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/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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 cc_call = [] 197 cc_call = []
198 private_call = [] 198 private_call = []
199 else: 199 else:
200 cc_call = [((['git', 'config', 'rietveld.cc'],), '')] 200 cc_call = [((['git', 'config', 'rietveld.cc'],), '')]
201 private_call = [ 201 private_call = [
202 ((['git', 'config', 'rietveld.private'],), '')] 202 ((['git', 'config', 'rietveld.private'],), '')]
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.canonical-url'],), ''),
207 ((['git', 'config', 'branch.master.base-url'],), ''), 208 ((['git', 'config', 'branch.master.base-url'],), ''),
208 ((['git', 209 ((['git',
209 'config', '--local', '--get-regexp', '^svn-remote\\.'],), 210 'config', '--local', '--get-regexp', '^svn-remote\\.'],),
210 (('', None), 0)), 211 (('', None), 0)),
211 ((['git', 'rev-parse', '--show-cdup'],), ''), 212 ((['git', 'rev-parse', '--show-cdup'],), ''),
212 ((['git', 'svn', 'info'],), ''), 213 ((['git', 'svn', 'info'],), ''),
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'],), ''),
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 obj = git_cl.ChangeDescription(orig) 746 obj = git_cl.ChangeDescription(orig)
746 obj.update_reviewers(reviewers) 747 obj.update_reviewers(reviewers)
747 actual.append(obj.description) 748 actual.append(obj.description)
748 self.assertEqual(expected, actual) 749 self.assertEqual(expected, actual)
749 750
750 751
751 if __name__ == '__main__': 752 if __name__ == '__main__':
752 git_cl.logging.basicConfig( 753 git_cl.logging.basicConfig(
753 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 754 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
754 unittest.main() 755 unittest.main()
OLDNEW
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698