Chromium Code Reviews

Unified Diff: tests/git_cl_test.py

Issue 1878613003: Fix git cl checkout when no branch has issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: actual fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index e94e9129a10219740c2893620c608dc9bcb3188a..a9c1072dd58fc53ab8d53a53398245538545dbc4 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1180,6 +1180,19 @@ class TestGitCl(TestCase):
self.calls = self._checkout_calls()
self.assertEqual(1, git_cl.main(['checkout', '99999']))
+ def test_checkout_no_branch_issues(self):
+ """Tests git cl checkout <issue>."""
+ self.calls = [
+ ((['git', 'config', '--local', '--get-regexp',
+ 'branch\\..*\\.rietveldissue'], ), '',
+ subprocess2.CalledProcessError(1, '', '', '', '')),
+ ((['git', 'config', '--local', '--get-regexp',
+ 'branch\\..*\\.gerritissue'], ), '',
+ subprocess2.CalledProcessError(1, '', '', '', '')),
+
+ ]
+ self.assertEqual(1, git_cl.main(['checkout', '99999']))
+
if __name__ == '__main__':
git_cl.logging.basicConfig(
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine