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 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 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 input_api.canned_checks = presubmit_canned_checks | 1860 input_api.canned_checks = presubmit_canned_checks |
1861 input_api.Command = presubmit.CommandData | 1861 input_api.Command = presubmit.CommandData |
1862 input_api.RunTests = functools.partial( | 1862 input_api.RunTests = functools.partial( |
1863 presubmit.InputApi.RunTests, input_api) | 1863 presubmit.InputApi.RunTests, input_api) |
1864 return input_api | 1864 return input_api |
1865 | 1865 |
1866 def testMembersChanged(self): | 1866 def testMembersChanged(self): |
1867 self.mox.ReplayAll() | 1867 self.mox.ReplayAll() |
1868 members = [ | 1868 members = [ |
1869 'DEFAULT_LINT_FILTERS', | 1869 'DEFAULT_LINT_FILTERS', |
| 1870 'BLACKLIST_LINT_FILTERS', |
1870 'CheckBuildbotPendingBuilds', | 1871 'CheckBuildbotPendingBuilds', |
1871 'CheckChangeHasBugField', 'CheckChangeHasDescription', | 1872 'CheckChangeHasBugField', 'CheckChangeHasDescription', |
1872 'CheckChangeHasNoStrayWhitespace', | 1873 'CheckChangeHasNoStrayWhitespace', |
1873 'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR', | 1874 'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR', |
1874 'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs', | 1875 'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs', |
1875 'CheckChangeTodoHasOwner', | 1876 'CheckChangeTodoHasOwner', |
1876 'CheckChangeHasQaField', 'CheckChangeHasTestedField', | 1877 'CheckChangeHasQaField', 'CheckChangeHasTestedField', |
1877 'CheckChangeHasTestField', | 1878 'CheckChangeHasTestField', |
1878 'CheckChangeLintsClean', | 1879 'CheckChangeLintsClean', |
1879 'CheckChangeSvnEolStyle', | 1880 'CheckChangeSvnEolStyle', |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2887 owners_check=False) | 2888 owners_check=False) |
2888 self.assertEqual(2, len(results)) | 2889 self.assertEqual(2, len(results)) |
2889 self.assertEqual( | 2890 self.assertEqual( |
2890 'Found line ending with white spaces in:', results[0]._message) | 2891 'Found line ending with white spaces in:', results[0]._message) |
2891 self.checkstdout('') | 2892 self.checkstdout('') |
2892 | 2893 |
2893 | 2894 |
2894 if __name__ == '__main__': | 2895 if __name__ == '__main__': |
2895 import unittest | 2896 import unittest |
2896 unittest.main() | 2897 unittest.main() |
OLD | NEW |