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 logging | 10 import logging |
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1484 input_api.tbr = False | 1484 input_api.tbr = False |
1485 input_api.python_executable = 'pyyyyython' | 1485 input_api.python_executable = 'pyyyyython' |
1486 input_api.platform = sys.platform | 1486 input_api.platform = sys.platform |
1487 input_api.time = time | 1487 input_api.time = time |
1488 input_api.canned_checks = presubmit_canned_checks | 1488 input_api.canned_checks = presubmit_canned_checks |
1489 return input_api | 1489 return input_api |
1490 | 1490 |
1491 def testMembersChanged(self): | 1491 def testMembersChanged(self): |
1492 self.mox.ReplayAll() | 1492 self.mox.ReplayAll() |
1493 members = [ | 1493 members = [ |
| 1494 're', |
1494 'CheckBuildbotPendingBuilds', | 1495 'CheckBuildbotPendingBuilds', |
1495 'CheckChangeHasBugField', 'CheckChangeHasDescription', | 1496 'CheckChangeHasBugField', 'CheckChangeHasDescription', |
1496 'CheckChangeHasNoStrayWhitespace', | 1497 'CheckChangeHasNoStrayWhitespace', |
1497 'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR', | 1498 'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR', |
1498 'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs', | 1499 'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs', |
1499 'CheckChangeTodoHasOwner', | 1500 'CheckChangeTodoHasOwner', |
1500 'CheckChangeHasQaField', 'CheckChangeHasTestedField', | 1501 'CheckChangeHasQaField', 'CheckChangeHasTestedField', |
1501 'CheckChangeHasTestField', | 1502 'CheckChangeHasTestField', |
1502 'CheckChangeLintsClean', | 1503 'CheckChangeLintsClean', |
1503 'CheckChangeSvnEolStyle', | 1504 'CheckChangeSvnEolStyle', |
1504 'CheckChangeWasUploaded', | 1505 'CheckChangeWasUploaded', |
1505 'CheckDoNotSubmit', | 1506 'CheckDoNotSubmit', |
1506 'CheckDoNotSubmitInDescription', 'CheckDoNotSubmitInFiles', | 1507 'CheckDoNotSubmitInDescription', 'CheckDoNotSubmitInFiles', |
| 1508 'CheckChangeDescriptionNotCommitted', |
1507 'CheckLongLines', 'CheckTreeIsOpen', 'PanProjectChecks', | 1509 'CheckLongLines', 'CheckTreeIsOpen', 'PanProjectChecks', |
1508 'CheckLicense', | 1510 'CheckLicense', |
1509 'CheckOwners', | 1511 'CheckOwners', |
1510 'CheckRietveldTryJobExecution', | 1512 'CheckRietveldTryJobExecution', |
1511 'CheckSingletonInHeaders', | 1513 'CheckSingletonInHeaders', |
1512 'CheckSvnModifiedDirectories', | 1514 'CheckSvnModifiedDirectories', |
1513 'CheckSvnForCommonMimeTypes', 'CheckSvnProperty', | 1515 'CheckSvnForCommonMimeTypes', 'CheckSvnProperty', |
1514 'RunPythonUnitTests', 'RunPylint', | 1516 'RunPythonUnitTests', 'RunPylint', |
1515 'RunUnitTests', 'RunUnitTestsInDirectory', | 1517 'RunUnitTests', 'RunUnitTestsInDirectory', |
1516 ] | 1518 ] |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2484 owners_check=False) | 2486 owners_check=False) |
2485 self.assertEqual(1, len(results)) | 2487 self.assertEqual(1, len(results)) |
2486 self.assertEqual( | 2488 self.assertEqual( |
2487 'Found line ending with white spaces in:', results[0]._message) | 2489 'Found line ending with white spaces in:', results[0]._message) |
2488 self.checkstdout('') | 2490 self.checkstdout('') |
2489 | 2491 |
2490 | 2492 |
2491 if __name__ == '__main__': | 2493 if __name__ == '__main__': |
2492 import unittest | 2494 import unittest |
2493 unittest.main() | 2495 unittest.main() |
OLD | NEW |