OLD | NEW |
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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 commit_user=self.usr, | 450 commit_user=self.usr, |
451 post_processors=post_processors) | 451 post_processors=post_processors) |
452 | 452 |
453 def testAll(self): | 453 def testAll(self): |
454 root = os.path.join(self.root_dir, self.name) | 454 root = os.path.join(self.root_dir, self.name) |
455 self._check_base(self._get_co(None), root, None) | 455 self._check_base(self._get_co(None), root, None) |
456 | 456 |
457 def testException(self): | 457 def testException(self): |
458 self._check_exception( | 458 self._check_exception( |
459 self._get_co(None), | 459 self._get_co(None), |
460 'While running git apply --index -p1;\n fatal: corrupt patch at line ' | 460 'While running git apply --index -3 -p1;\n fatal: corrupt patch at ' |
461 '12\n') | 461 'line 12\n') |
462 | 462 |
463 def testProcess(self): | 463 def testProcess(self): |
464 self._test_process(self._get_co) | 464 self._test_process(self._get_co) |
465 | 465 |
466 def _testPrepare(self): | 466 def _testPrepare(self): |
467 self._test_prepare(self._get_co(None)) | 467 self._test_prepare(self._get_co(None)) |
468 | 468 |
469 def testMove(self): | 469 def testMove(self): |
470 co = self._get_co(None) | 470 co = self._get_co(None) |
471 self._check_move(co) | 471 self._check_move(co) |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 if '-v' in sys.argv: | 728 if '-v' in sys.argv: |
729 DEBUGGING = True | 729 DEBUGGING = True |
730 logging.basicConfig( | 730 logging.basicConfig( |
731 level=logging.DEBUG, | 731 level=logging.DEBUG, |
732 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') | 732 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') |
733 else: | 733 else: |
734 logging.basicConfig( | 734 logging.basicConfig( |
735 level=logging.ERROR, | 735 level=logging.ERROR, |
736 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') | 736 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') |
737 unittest.main() | 737 unittest.main() |
OLD | NEW |