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

Side by Side Diff: tests/presubmit_unittest.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/patches_data.py ('k') | tests/rietveld_test.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 presubmit_support.py and presubmit_canned_checks.py.""" 6 """Unit tests for presubmit_support.py and presubmit_canned_checks.py."""
7 7
8 # pylint: disable=E1101,E1103 8 # pylint: disable=E1101,E1103
9 9
10 import logging 10 import logging
11 import os 11 import os
12 import StringIO 12 import StringIO
13 import sys 13 import sys
14 import time 14 import time
15 15
16 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 16 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
17 17
18 from super_mox import mox, SuperMoxTestBase 18 from testing_support.super_mox import mox, SuperMoxTestBase
19 19
20 import owners 20 import owners
21 import presubmit_support as presubmit 21 import presubmit_support as presubmit
22 import rietveld 22 import rietveld
23 23
24 # Shortcut. 24 # Shortcut.
25 presubmit_canned_checks = presubmit.presubmit_canned_checks 25 presubmit_canned_checks = presubmit.presubmit_canned_checks
26 26
27 27
28 class PresubmitTestsBase(SuperMoxTestBase): 28 class PresubmitTestsBase(SuperMoxTestBase):
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 self.assertEqual(1, len(results)) 2233 self.assertEqual(1, len(results))
2234 # pylint: disable=W0212 2234 # pylint: disable=W0212
2235 self.assertEqual( 2235 self.assertEqual(
2236 'Found line ending with white spaces in:', results[0]._message) 2236 'Found line ending with white spaces in:', results[0]._message)
2237 self.checkstdout('') 2237 self.checkstdout('')
2238 2238
2239 2239
2240 if __name__ == '__main__': 2240 if __name__ == '__main__':
2241 import unittest 2241 import unittest
2242 unittest.main() 2242 unittest.main()
OLDNEW
« no previous file with comments | « tests/patches_data.py ('k') | tests/rietveld_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698