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

Side by Side Diff: tests/gclient_test.py

Issue 7840033: Urls with /@ won't be processed correctly when used as a requirements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « gclient.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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 gclient.py. 6 """Unit tests for gclient.py.
7 7
8 See gclient_smoketest.py for integration tests. 8 See gclient_smoketest.py for integration tests.
9 """ 9 """
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 def _get_processed(self): 175 def _get_processed(self):
176 items = [] 176 items = []
177 try: 177 try:
178 while True: 178 while True:
179 items.append(self.processed.get_nowait()) 179 items.append(self.processed.get_nowait())
180 except Queue.Empty: 180 except Queue.Empty:
181 pass 181 pass
182 return items 182 return items
183 183
184 def testAutofix(self):
185 # Invalid urls causes pain when specifying requirements. Make sure it's
186 # auto-fixed.
187 d = gclient.Dependency(
188 None, 'name', 'proto://host/path/@revision', None, None,
189 None, '', True)
190 self.assertEquals('proto://host/path@revision', d.url)
184 191
185 if __name__ == '__main__': 192 if __name__ == '__main__':
186 logging.basicConfig( 193 logging.basicConfig(
187 level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][ 194 level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][
188 min(sys.argv.count('-v'), 3)], 195 min(sys.argv.count('-v'), 3)],
189 format='%(asctime).19s %(levelname)s %(filename)s:' 196 format='%(asctime).19s %(levelname)s %(filename)s:'
190 '%(lineno)s %(message)s') 197 '%(lineno)s %(message)s')
191 unittest.main() 198 unittest.main()
OLDNEW
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698