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