| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 @classmethod | 330 @classmethod |
| 331 def _dcommit_calls_3(cls): | 331 def _dcommit_calls_3(cls): |
| 332 return [ | 332 return [ |
| 333 ((['git', | 333 ((['git', |
| 334 'diff', '--no-ext-diff', '--stat', '--find-copies-harder', | 334 'diff', '--no-ext-diff', '--stat', '--find-copies-harder', |
| 335 '-l100000', '-C50', 'fake_ancestor_sha', | 335 '-l100000', '-C50', 'fake_ancestor_sha', |
| 336 'refs/heads/working'],), | 336 'refs/heads/working'],), |
| 337 (' PRESUBMIT.py | 2 +-\n' | 337 (' PRESUBMIT.py | 2 +-\n' |
| 338 ' 1 files changed, 1 insertions(+), 1 deletions(-)\n')), | 338 ' 1 files changed, 1 insertions(+), 1 deletions(-)\n')), |
| 339 (('About to commit; enter to confirm.',), None), | |
| 340 ((['git', 'show-ref', '--quiet', '--verify', | 339 ((['git', 'show-ref', '--quiet', '--verify', |
| 341 'refs/heads/git-cl-commit'],), | 340 'refs/heads/git-cl-commit'],), |
| 342 (('', None), 0)), | 341 (('', None), 0)), |
| 343 ((['git', 'branch', '-D', 'git-cl-commit'],), ''), | 342 ((['git', 'branch', '-D', 'git-cl-commit'],), ''), |
| 344 ((['git', 'show-ref', '--quiet', '--verify', | 343 ((['git', 'show-ref', '--quiet', '--verify', |
| 345 'refs/heads/git-cl-cherry-pick'],), ''), | 344 'refs/heads/git-cl-cherry-pick'],), ''), |
| 346 ((['git', 'rev-parse', '--show-cdup'],), '\n'), | 345 ((['git', 'rev-parse', '--show-cdup'],), '\n'), |
| 347 ((['git', 'checkout', '-q', '-b', 'git-cl-commit'],), ''), | 346 ((['git', 'checkout', '-q', '-b', 'git-cl-commit'],), ''), |
| 348 ((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''), | 347 ((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''), |
| 349 ((['git', 'commit', '-m', | 348 ((['git', 'commit', '-m', |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 def AffectedFiles(self): | 861 def AffectedFiles(self): |
| 863 return [] | 862 return [] |
| 864 | 863 |
| 865 def LocalPaths(self): | 864 def LocalPaths(self): |
| 866 return None | 865 return None |
| 867 | 866 |
| 868 if __name__ == '__main__': | 867 if __name__ == '__main__': |
| 869 git_cl.logging.basicConfig( | 868 git_cl.logging.basicConfig( |
| 870 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) | 869 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) |
| 871 unittest.main() | 870 unittest.main() |
| OLD | NEW |