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

Side by Side Diff: tests/checkout_test.py

Issue 2073553003: Fix presubmit checkout test after git 2.9.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | 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 checkout.py.""" 6 """Unit tests for checkout.py."""
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 def testProcess(self): 304 def testProcess(self):
305 self._test_process(self._get_co) 305 self._test_process(self._get_co)
306 306
307 def _testPrepare(self): 307 def _testPrepare(self):
308 self._test_prepare(self._get_co(None)) 308 self._test_prepare(self._get_co(None))
309 309
310 def testMove(self): 310 def testMove(self):
311 co = self._get_co(None) 311 co = self._get_co(None)
312 self._check_move(co) 312 self._check_move(co)
313 out = subprocess2.check_output( 313 out = subprocess2.check_output(
314 ['git', 'diff', '--staged', '--name-status'], cwd=co.project_path) 314 ['git', 'diff', '--staged', '--name-status', '--no-renames'],
315 cwd=co.project_path)
315 out = sorted(out.splitlines()) 316 out = sorted(out.splitlines())
316 expected = sorted( 317 expected = sorted(
317 [ 318 [
318 'A\tchromeos/views/webui_menu_widget.h', 319 'A\tchromeos/views/webui_menu_widget.h',
319 'D\tchromeos/views/DOMui_menu_widget.h', 320 'D\tchromeos/views/DOMui_menu_widget.h',
320 ]) 321 ])
321 self.assertEquals(expected, out) 322 self.assertEquals(expected, out)
322 323
323 324
324 if __name__ == '__main__': 325 if __name__ == '__main__':
325 if '-v' in sys.argv: 326 if '-v' in sys.argv:
326 DEBUGGING = True 327 DEBUGGING = True
327 logging.basicConfig( 328 logging.basicConfig(
328 level=logging.DEBUG, 329 level=logging.DEBUG,
329 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') 330 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
330 else: 331 else:
331 logging.basicConfig( 332 logging.basicConfig(
332 level=logging.ERROR, 333 level=logging.ERROR,
333 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') 334 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
334 unittest.main() 335 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698