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

Side by Side Diff: tests/presubmit_unittest.py

Issue 281013002: Recursively find all tests in a repo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 7 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
« presubmit_canned_checks.py ('K') | « presubmit_canned_checks.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) 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 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 functools 10 import functools
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 'CheckLicense', 1878 'CheckLicense',
1879 'CheckOwners', 1879 'CheckOwners',
1880 'CheckPatchFormatted', 1880 'CheckPatchFormatted',
1881 'CheckRietveldTryJobExecution', 1881 'CheckRietveldTryJobExecution',
1882 'CheckSingletonInHeaders', 1882 'CheckSingletonInHeaders',
1883 'CheckSvnModifiedDirectories', 1883 'CheckSvnModifiedDirectories',
1884 'CheckSvnForCommonMimeTypes', 'CheckSvnProperty', 1884 'CheckSvnForCommonMimeTypes', 'CheckSvnProperty',
1885 'RunPythonUnitTests', 'RunPylint', 1885 'RunPythonUnitTests', 'RunPylint',
1886 'RunUnitTests', 'RunUnitTestsInDirectory', 1886 'RunUnitTests', 'RunUnitTestsInDirectory',
1887 'GetPythonUnitTests', 'GetPylint', 1887 'GetPythonUnitTests', 'GetPylint',
1888 'GetUnitTests', 'GetUnitTestsInDirectory', 1888 'GetUnitTests', 'GetUnitTestsInDirectory', 'GetGitUnitTestsRecursively',
1889 ] 1889 ]
1890 # If this test fails, you should add the relevant test. 1890 # If this test fails, you should add the relevant test.
1891 self.compareMembers(presubmit_canned_checks, members) 1891 self.compareMembers(presubmit_canned_checks, members)
1892 1892
1893 def DescriptionTest(self, check, description1, description2, error_type, 1893 def DescriptionTest(self, check, description1, description2, error_type,
1894 committing): 1894 committing):
1895 change1 = presubmit.Change( 1895 change1 = presubmit.Change(
1896 'foo1', description1, self.fake_root_dir, None, 0, 0, None) 1896 'foo1', description1, self.fake_root_dir, None, 0, 0, None)
1897 input_api1 = self.MockInputApi(change1, committing) 1897 input_api1 = self.MockInputApi(change1, committing)
1898 change2 = presubmit.Change( 1898 change2 = presubmit.Change(
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 owners_check=False) 2909 owners_check=False)
2910 self.assertEqual(1, len(results)) 2910 self.assertEqual(1, len(results))
2911 self.assertEqual( 2911 self.assertEqual(
2912 'Found line ending with white spaces in:', results[0]._message) 2912 'Found line ending with white spaces in:', results[0]._message)
2913 self.checkstdout('') 2913 self.checkstdout('')
2914 2914
2915 2915
2916 if __name__ == '__main__': 2916 if __name__ == '__main__':
2917 import unittest 2917 import unittest
2918 unittest.main() 2918 unittest.main()
OLDNEW
« presubmit_canned_checks.py ('K') | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698