OLD | NEW |
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 Loading... |
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.base-url'],), ''), | 207 ((['git', 'config', 'branch.master.canonical-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', | 213 ((['git', |
214 'config', 'branch.master.rietveldissue', '1'],), ''), | 214 'config', 'branch.master.rietveldissue', '1'],), ''), |
215 ((['git', 'config', 'branch.master.rietveldserver', | 215 ((['git', 'config', 'branch.master.rietveldserver', |
216 'https://codereview.example.com'],), ''), | 216 'https://codereview.example.com'],), ''), |
217 ((['git', | 217 ((['git', |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 obj = git_cl.ChangeDescription(orig) | 745 obj = git_cl.ChangeDescription(orig) |
746 obj.update_reviewers(reviewers) | 746 obj.update_reviewers(reviewers) |
747 actual.append(obj.description) | 747 actual.append(obj.description) |
748 self.assertEqual(expected, actual) | 748 self.assertEqual(expected, actual) |
749 | 749 |
750 | 750 |
751 if __name__ == '__main__': | 751 if __name__ == '__main__': |
752 git_cl.logging.basicConfig( | 752 git_cl.logging.basicConfig( |
753 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) | 753 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) |
754 unittest.main() | 754 unittest.main() |
OLD | NEW |