Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: tests/git_rebase_update_test.py

Issue 1498163002: Add better error messages to git_reparent_branch. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « git_reparent_branch.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 )))
OLDNEW
« no previous file with comments | « git_reparent_branch.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698