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

Side by Side Diff: tests/git_cl_test.py

Issue 2215433004: Extract patchset in Rietveld URLs better (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 4 months 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_cl.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 (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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 self.assertEqual(result.patch_url, patch_url) 138 self.assertEqual(result.patch_url, patch_url)
139 139
140 test('http://codereview.chromium.org/123', 140 test('http://codereview.chromium.org/123',
141 123, None, 'codereview.chromium.org') 141 123, None, 'codereview.chromium.org')
142 test('https://codereview.chromium.org/123', 142 test('https://codereview.chromium.org/123',
143 123, None, 'codereview.chromium.org') 143 123, None, 'codereview.chromium.org')
144 test('https://codereview.chromium.org/123/', 144 test('https://codereview.chromium.org/123/',
145 123, None, 'codereview.chromium.org') 145 123, None, 'codereview.chromium.org')
146 test('https://codereview.chromium.org/123/whatever', 146 test('https://codereview.chromium.org/123/whatever',
147 123, None, 'codereview.chromium.org') 147 123, None, 'codereview.chromium.org')
148 test('https://codereview.chromium.org/123/#ps20001',
149 123, 20001, 'codereview.chromium.org')
148 test('http://codereview.chromium.org/download/issue123_4.diff', 150 test('http://codereview.chromium.org/download/issue123_4.diff',
149 123, 4, 'codereview.chromium.org', 151 123, 4, 'codereview.chromium.org',
150 patch_url='https://codereview.chromium.org/download/issue123_4.diff') 152 patch_url='https://codereview.chromium.org/download/issue123_4.diff')
151 # This looks like bad Gerrit, but is actually valid Rietveld. 153 # This looks like bad Gerrit, but is actually valid Rietveld.
152 test('https://chrome-review.source.com/123/4/', 154 test('https://chrome-review.source.com/123/4/',
153 123, None, 'chrome-review.source.com') 155 123, None, 'chrome-review.source.com')
154 156
155 test('https://codereview.chromium.org/deadbeaf', fail=True) 157 test('https://codereview.chromium.org/deadbeaf', fail=True)
156 test('https://codereview.chromium.org/api/123', fail=True) 158 test('https://codereview.chromium.org/api/123', fail=True)
157 test('bad://codereview.chromium.org/123', fail=True) 159 test('bad://codereview.chromium.org/123', fail=True)
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 ((['rm_file_or_tree', '/abs/git_repo_root/.git/hooks/commit-msg'],), 1750 ((['rm_file_or_tree', '/abs/git_repo_root/.git/hooks/commit-msg'],),
1749 ''), 1751 ''),
1750 ] 1752 ]
1751 cl._codereview_impl._GerritCommitMsgHookCheck(offer_removal=True) 1753 cl._codereview_impl._GerritCommitMsgHookCheck(offer_removal=True)
1752 1754
1753 1755
1754 if __name__ == '__main__': 1756 if __name__ == '__main__':
1755 git_cl.logging.basicConfig( 1757 git_cl.logging.basicConfig(
1756 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 1758 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
1757 unittest.main() 1759 unittest.main()
OLDNEW
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698