| 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 'gerrit.chromium.org'],), ''), | 667 'gerrit.chromium.org'],), ''), |
| 668 ((['git', 'config', '--unset-all', 'rietveld.cc'],), ''), | 668 ((['git', 'config', '--unset-all', 'rietveld.cc'],), ''), |
| 669 ((['git', 'config', '--unset-all', | 669 ((['git', 'config', '--unset-all', |
| 670 'rietveld.private'],), ''), | 670 'rietveld.private'],), ''), |
| 671 ((['git', 'config', '--unset-all', | 671 ((['git', 'config', '--unset-all', |
| 672 'rietveld.tree-status-url'],), ''), | 672 'rietveld.tree-status-url'],), ''), |
| 673 ((['git', 'config', '--unset-all', | 673 ((['git', 'config', '--unset-all', |
| 674 'rietveld.viewvc-url'],), ''), | 674 'rietveld.viewvc-url'],), ''), |
| 675 ((['git', 'config', '--unset-all', | 675 ((['git', 'config', '--unset-all', |
| 676 'rietveld.bug-prefix'],), ''), | 676 'rietveld.bug-prefix'],), ''), |
| 677 ((['git', 'config', '--unset-all', |
| 678 'rietveld.cpplint-regex'],), ''), |
| 679 ((['git', 'config', '--unset-all', |
| 680 'rietveld.cpplint-ignore-regex'],), ''), |
| 677 ((['git', 'config', 'gerrit.host', | 681 ((['git', 'config', 'gerrit.host', |
| 678 'gerrit.chromium.org'],), ''), | 682 'gerrit.chromium.org'],), ''), |
| 679 # DownloadHooks(False) | 683 # DownloadHooks(False) |
| 680 ((['git', 'config', 'gerrit.host'],), | 684 ((['git', 'config', 'gerrit.host'],), |
| 681 'gerrit.chromium.org'), | 685 'gerrit.chromium.org'), |
| 682 ((['git', 'rev-parse', '--show-cdup'],), ''), | 686 ((['git', 'rev-parse', '--show-cdup'],), ''), |
| 683 ((commit_msg_path, os.X_OK,), False), | 687 ((commit_msg_path, os.X_OK,), False), |
| 684 (('https://gerrit-review.googlesource.com/tools/hooks/commit-msg', | 688 (('https://gerrit-review.googlesource.com/tools/hooks/commit-msg', |
| 685 commit_msg_path,), ''), | 689 commit_msg_path,), ''), |
| 686 ((commit_msg_path,), True), | 690 ((commit_msg_path,), True), |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 obj = git_cl.ChangeDescription(orig) | 737 obj = git_cl.ChangeDescription(orig) |
| 734 obj.update_reviewers(reviewers) | 738 obj.update_reviewers(reviewers) |
| 735 actual.append(obj.description) | 739 actual.append(obj.description) |
| 736 self.assertEqual(expected, actual) | 740 self.assertEqual(expected, actual) |
| 737 | 741 |
| 738 | 742 |
| 739 if __name__ == '__main__': | 743 if __name__ == '__main__': |
| 740 git_cl.logging.basicConfig( | 744 git_cl.logging.basicConfig( |
| 741 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) | 745 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) |
| 742 unittest.main() | 746 unittest.main() |
| OLD | NEW |