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

Side by Side Diff: tests/patch_test.py

Issue 8508015: Create a new depot_tools_testing_lib to move utility modules there (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Renamed to testing_support Created 9 years, 1 month 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 | « tests/owners_unittest.py ('k') | tests/patches_data.py » ('j') | 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 patch.py.""" 6 """Unit tests for patch.py."""
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import posixpath 10 import posixpath
11 import sys 11 import sys
12 import unittest 12 import unittest
13 13
14 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 14 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
15 15
16 from testing_support.patches_data import GIT, RAW
17
16 import patch 18 import patch
17 from tests.patches_data import GIT, RAW
18 19
19 20
20 class PatchTest(unittest.TestCase): 21 class PatchTest(unittest.TestCase):
21 def _check_patch(self, 22 def _check_patch(self,
22 p, 23 p,
23 filename, 24 filename,
24 diff, 25 diff,
25 source_filename=None, 26 source_filename=None,
26 is_binary=False, 27 is_binary=False,
27 is_delete=False, 28 is_delete=False,
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 self.fail() 452 self.fail()
452 except patch.UnsupportedPatchFormat: 453 except patch.UnsupportedPatchFormat:
453 pass 454 pass
454 455
455 456
456 if __name__ == '__main__': 457 if __name__ == '__main__':
457 logging.basicConfig(level= 458 logging.basicConfig(level=
458 [logging.WARNING, logging.INFO, logging.DEBUG][ 459 [logging.WARNING, logging.INFO, logging.DEBUG][
459 min(2, sys.argv.count('-v'))]) 460 min(2, sys.argv.count('-v'))])
460 unittest.main() 461 unittest.main()
OLDNEW
« no previous file with comments | « tests/owners_unittest.py ('k') | tests/patches_data.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698