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

Side by Side Diff: tests/presubmit_unittest.py

Issue 1955223002: Properly expose already used elsewhere functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 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
« no previous file with comments | « 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 StringIO 10 import StringIO
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 'CheckLongLines', 'CheckTreeIsOpen', 'PanProjectChecks', 1879 'CheckLongLines', 'CheckTreeIsOpen', 'PanProjectChecks',
1880 'CheckLicense', 1880 'CheckLicense',
1881 'CheckOwners', 1881 'CheckOwners',
1882 'CheckPatchFormatted', 1882 'CheckPatchFormatted',
1883 'CheckGNFormatted', 1883 'CheckGNFormatted',
1884 'CheckRietveldTryJobExecution', 1884 'CheckRietveldTryJobExecution',
1885 'CheckSingletonInHeaders', 1885 'CheckSingletonInHeaders',
1886 'CheckSvnForCommonMimeTypes', 'CheckSvnProperty', 1886 'CheckSvnForCommonMimeTypes', 'CheckSvnProperty',
1887 'RunPythonUnitTests', 'RunPylint', 1887 'RunPythonUnitTests', 'RunPylint',
1888 'RunUnitTests', 'RunUnitTestsInDirectory', 1888 'RunUnitTests', 'RunUnitTestsInDirectory',
1889 'GetCodereviewOwnerAndReviewers',
1889 'GetPythonUnitTests', 'GetPylint', 1890 'GetPythonUnitTests', 'GetPylint',
1890 'GetUnitTests', 'GetUnitTestsInDirectory', 'GetUnitTestsRecursively', 1891 'GetUnitTests', 'GetUnitTestsInDirectory', 'GetUnitTestsRecursively',
1891 ] 1892 ]
1892 # If this test fails, you should add the relevant test. 1893 # If this test fails, you should add the relevant test.
1893 self.compareMembers(presubmit_canned_checks, members) 1894 self.compareMembers(presubmit_canned_checks, members)
1894 1895
1895 def DescriptionTest(self, check, description1, description2, error_type, 1896 def DescriptionTest(self, check, description1, description2, error_type,
1896 committing): 1897 committing):
1897 change1 = presubmit.Change( 1898 change1 = presubmit.Change(
1898 'foo1', description1, self.fake_root_dir, None, 0, 0, None) 1899 'foo1', description1, self.fake_root_dir, None, 0, 0, None)
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 owners_check=False) 2922 owners_check=False)
2922 self.assertEqual(2, len(results)) 2923 self.assertEqual(2, len(results))
2923 self.assertEqual( 2924 self.assertEqual(
2924 'Found line ending with white spaces in:', results[0]._message) 2925 'Found line ending with white spaces in:', results[0]._message)
2925 self.checkstdout('') 2926 self.checkstdout('')
2926 2927
2927 2928
2928 if __name__ == '__main__': 2929 if __name__ == '__main__':
2929 import unittest 2930 import unittest
2930 unittest.main() 2931 unittest.main()
OLDNEW
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698