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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 ((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), | 263 ((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), |
264 ((['git', 'config', '--int', '--get', | 264 ((['git', 'config', '--int', '--get', |
265 'branch.working.git-cl-similarity'],), ''), | 265 'branch.working.git-cl-similarity'],), ''), |
266 ((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), | 266 ((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), |
267 ((['git', 'config', '--int', '--get', | 267 ((['git', 'config', '--int', '--get', |
268 'branch.working.git-find-copies'],), ''), | 268 'branch.working.git-find-copies'],), ''), |
269 ((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), | 269 ((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), |
270 ((['git', | 270 ((['git', |
271 'config', 'branch.working.merge'],), 'refs/heads/master'), | 271 'config', 'branch.working.merge'],), 'refs/heads/master'), |
272 ((['git', 'config', 'branch.working.remote'],), 'origin'), | 272 ((['git', 'config', 'branch.working.remote'],), 'origin'), |
| 273 ((['git', 'config', 'branch.working.merge'],), |
| 274 'refs/heads/master'), |
| 275 ((['git', 'config', 'branch.working.remote'],), 'origin'), |
273 ((['git', 'rev-list', '--merges', | 276 ((['git', 'rev-list', '--merges', |
274 '--grep=^SVN changes up to revision [0-9]*$', | 277 '--grep=^SVN changes up to revision [0-9]*$', |
275 'refs/remotes/origin/master^!'],), ''), | 278 'refs/remotes/origin/master^!'],), ''), |
276 ((['git', 'update-index', '--refresh', '-q'],), ''), | 279 ((['git', 'update-index', '--refresh', '-q'],), ''), |
277 ((['git', 'diff-index', '--name-status', 'HEAD'],), ''), | 280 ((['git', 'diff-index', '--name-status', 'HEAD'],), ''), |
278 ((['git', 'rev-list', '^refs/heads/working', | 281 ((['git', 'rev-list', '^refs/heads/working', |
279 'refs/remotes/origin/master'],), | 282 'refs/remotes/origin/master'],), |
280 ''), | 283 ''), |
281 ((['git', | 284 ((['git', |
282 'log', '--grep=^git-svn-id:', '-1', '--pretty=format:%H'],), | 285 'log', '--grep=^git-svn-id:', '-1', '--pretty=format:%H'],), |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 obj = git_cl.ChangeDescription(orig) | 744 obj = git_cl.ChangeDescription(orig) |
742 obj.update_reviewers(reviewers) | 745 obj.update_reviewers(reviewers) |
743 actual.append(obj.description) | 746 actual.append(obj.description) |
744 self.assertEqual(expected, actual) | 747 self.assertEqual(expected, actual) |
745 | 748 |
746 | 749 |
747 if __name__ == '__main__': | 750 if __name__ == '__main__': |
748 git_cl.logging.basicConfig( | 751 git_cl.logging.basicConfig( |
749 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) | 752 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) |
750 unittest.main() | 753 unittest.main() |
OLD | NEW |