| 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 'gerrit.chromium.org'],), ''), | 655 'gerrit.chromium.org'],), ''), |
| 656 ((['git', 'config', '--unset-all', 'rietveld.cc'],), ''), | 656 ((['git', 'config', '--unset-all', 'rietveld.cc'],), ''), |
| 657 ((['git', 'config', '--unset-all', | 657 ((['git', 'config', '--unset-all', |
| 658 'rietveld.private'],), ''), | 658 'rietveld.private'],), ''), |
| 659 ((['git', 'config', '--unset-all', | 659 ((['git', 'config', '--unset-all', |
| 660 'rietveld.tree-status-url'],), ''), | 660 'rietveld.tree-status-url'],), ''), |
| 661 ((['git', 'config', '--unset-all', | 661 ((['git', 'config', '--unset-all', |
| 662 'rietveld.viewvc-url'],), ''), | 662 'rietveld.viewvc-url'],), ''), |
| 663 ((['git', 'config', 'gerrit.host', | 663 ((['git', 'config', 'gerrit.host', |
| 664 'gerrit.chromium.org'],), ''), | 664 'gerrit.chromium.org'],), ''), |
| 665 ((['git', 'config', 'gerrit.port', '29418'],), ''), | |
| 666 # DownloadHooks(False) | 665 # DownloadHooks(False) |
| 667 ((['git', 'config', 'gerrit.host'],), | 666 ((['git', 'config', 'gerrit.host'],), |
| 668 'gerrit.chromium.org'), | 667 'gerrit.chromium.org'), |
| 669 ((['git', 'rev-parse', '--show-cdup'],), ''), | 668 ((['git', 'rev-parse', '--show-cdup'],), ''), |
| 670 ((commit_msg_path, os.X_OK,), False), | 669 ((commit_msg_path, os.X_OK,), False), |
| 671 (('https://gerrit-review.googlesource.com/tools/hooks/commit-msg', | 670 (('https://gerrit-review.googlesource.com/tools/hooks/commit-msg', |
| 672 commit_msg_path,), ''), | 671 commit_msg_path,), ''), |
| 673 ((commit_msg_path,), True), | 672 ((commit_msg_path,), True), |
| 674 ((commit_msg_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR,), ''), | 673 ((commit_msg_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR,), ''), |
| 675 # GetCodereviewSettingsInteractively | 674 # GetCodereviewSettingsInteractively |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 obj = git_cl.ChangeDescription(orig) | 717 obj = git_cl.ChangeDescription(orig) |
| 719 obj.update_reviewers(reviewers) | 718 obj.update_reviewers(reviewers) |
| 720 actual.append(obj.description) | 719 actual.append(obj.description) |
| 721 self.assertEqual(expected, actual) | 720 self.assertEqual(expected, actual) |
| 722 | 721 |
| 723 | 722 |
| 724 if __name__ == '__main__': | 723 if __name__ == '__main__': |
| 725 git_cl.logging.basicConfig( | 724 git_cl.logging.basicConfig( |
| 726 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) | 725 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) |
| 727 unittest.main() | 726 unittest.main() |
| OLD | NEW |