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 functools | 10 import functools |
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1854 input_api.time = time | 1854 input_api.time = time |
1855 input_api.canned_checks = presubmit_canned_checks | 1855 input_api.canned_checks = presubmit_canned_checks |
1856 input_api.Command = presubmit.CommandData | 1856 input_api.Command = presubmit.CommandData |
1857 input_api.RunTests = functools.partial( | 1857 input_api.RunTests = functools.partial( |
1858 presubmit.InputApi.RunTests, input_api) | 1858 presubmit.InputApi.RunTests, input_api) |
1859 return input_api | 1859 return input_api |
1860 | 1860 |
1861 def testMembersChanged(self): | 1861 def testMembersChanged(self): |
1862 self.mox.ReplayAll() | 1862 self.mox.ReplayAll() |
1863 members = [ | 1863 members = [ |
| 1864 'DEFAULT_LINT_FILTERS', |
1864 'CheckBuildbotPendingBuilds', | 1865 'CheckBuildbotPendingBuilds', |
1865 'CheckChangeHasBugField', 'CheckChangeHasDescription', | 1866 'CheckChangeHasBugField', 'CheckChangeHasDescription', |
1866 'CheckChangeHasNoStrayWhitespace', | 1867 'CheckChangeHasNoStrayWhitespace', |
1867 'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR', | 1868 'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR', |
1868 'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs', | 1869 'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs', |
1869 'CheckChangeTodoHasOwner', | 1870 'CheckChangeTodoHasOwner', |
1870 'CheckChangeHasQaField', 'CheckChangeHasTestedField', | 1871 'CheckChangeHasQaField', 'CheckChangeHasTestedField', |
1871 'CheckChangeHasTestField', | 1872 'CheckChangeHasTestField', |
1872 'CheckChangeLintsClean', | 1873 'CheckChangeLintsClean', |
1873 'CheckChangeSvnEolStyle', | 1874 'CheckChangeSvnEolStyle', |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2920 owners_check=False) | 2921 owners_check=False) |
2921 self.assertEqual(1, len(results)) | 2922 self.assertEqual(1, len(results)) |
2922 self.assertEqual( | 2923 self.assertEqual( |
2923 'Found line ending with white spaces in:', results[0]._message) | 2924 'Found line ending with white spaces in:', results[0]._message) |
2924 self.checkstdout('') | 2925 self.checkstdout('') |
2925 | 2926 |
2926 | 2927 |
2927 if __name__ == '__main__': | 2928 if __name__ == '__main__': |
2928 import unittest | 2929 import unittest |
2929 unittest.main() | 2930 unittest.main() |
OLD | NEW |