| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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_rebase_update.py""" | 6 """Unit tests for git_rebase_update.py""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 """) | 380 """) |
| 381 | 381 |
| 382 output, _ = self.repo.capture_stdio(self.rp.main, ['--root']) | 382 output, _ = self.repo.capture_stdio(self.rp.main, ['--root']) |
| 383 self.assertIn('to track origin/master (was lkgr [tag])', output) | 383 self.assertIn('to track origin/master (was lkgr [tag])', output) |
| 384 | 384 |
| 385 self.assertSchema(""" | 385 self.assertSchema(""" |
| 386 A B C D E F G M N O foobar1 foobar2 | 386 A B C D E F G M N O foobar1 foobar2 |
| 387 M H I J K L | 387 M H I J K L |
| 388 """) | 388 """) |
| 389 | 389 |
| 390 def testReparentBranchWithoutUpstream(self): |
| 391 self.repo.git('branch', 'nerp') |
| 392 self.repo.git('checkout', 'nerp') |
| 393 |
| 394 _, err = self.repo.capture_stdio(self.rp.main, ['branch_K']) |
| 395 |
| 396 self.assertIn('Unable to determine nerp@{upstream}', err) |
| 397 |
| 390 | 398 |
| 391 if __name__ == '__main__': | 399 if __name__ == '__main__': |
| 392 sys.exit(coverage_utils.covered_main(( | 400 sys.exit(coverage_utils.covered_main(( |
| 393 os.path.join(DEPOT_TOOLS_ROOT, 'git_rebase_update.py'), | 401 os.path.join(DEPOT_TOOLS_ROOT, 'git_rebase_update.py'), |
| 394 os.path.join(DEPOT_TOOLS_ROOT, 'git_new_branch.py'), | 402 os.path.join(DEPOT_TOOLS_ROOT, 'git_new_branch.py'), |
| 395 os.path.join(DEPOT_TOOLS_ROOT, 'git_reparent_branch.py'), | 403 os.path.join(DEPOT_TOOLS_ROOT, 'git_reparent_branch.py'), |
| 396 os.path.join(DEPOT_TOOLS_ROOT, 'git_rename_branch.py') | 404 os.path.join(DEPOT_TOOLS_ROOT, 'git_rename_branch.py') |
| 397 ))) | 405 ))) |
| OLD | NEW |