| 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.canonical-url'],), ''), | |
| 208 ((['git', 'config', 'branch.master.base-url'],), ''), | 207 ((['git', 'config', 'branch.master.base-url'],), ''), |
| 209 ((['git', | 208 ((['git', |
| 210 'config', '--local', '--get-regexp', '^svn-remote\\.'],), | 209 'config', '--local', '--get-regexp', '^svn-remote\\.'],), |
| 211 (('', None), 0)), | 210 (('', None), 0)), |
| 212 ((['git', 'rev-parse', '--show-cdup'],), ''), | 211 ((['git', 'rev-parse', '--show-cdup'],), ''), |
| 213 ((['git', 'svn', 'info'],), ''), | 212 ((['git', 'svn', 'info'],), ''), |
| 214 ((['git', | 213 ((['git', |
| 215 'config', 'branch.master.rietveldissue', '1'],), ''), | 214 'config', 'branch.master.rietveldissue', '1'],), ''), |
| 216 ((['git', 'config', 'branch.master.rietveldserver', | 215 ((['git', 'config', 'branch.master.rietveldserver', |
| 217 'https://codereview.example.com'],), ''), | 216 'https://codereview.example.com'],), ''), |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 obj = git_cl.ChangeDescription(orig) | 745 obj = git_cl.ChangeDescription(orig) |
| 747 obj.update_reviewers(reviewers) | 746 obj.update_reviewers(reviewers) |
| 748 actual.append(obj.description) | 747 actual.append(obj.description) |
| 749 self.assertEqual(expected, actual) | 748 self.assertEqual(expected, actual) |
| 750 | 749 |
| 751 | 750 |
| 752 if __name__ == '__main__': | 751 if __name__ == '__main__': |
| 753 git_cl.logging.basicConfig( | 752 git_cl.logging.basicConfig( |
| 754 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) |
| 755 unittest.main() | 754 unittest.main() |
| OLD | NEW |