| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 is too confused. | 8 # pylint is too confused. |
| 9 # pylint: disable=E1101,E1103,R0201,W0212,W0403 | 9 # pylint: disable=E1101,E1103,R0201,W0212,W0403 |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 _INHERIT_SETTINGS = 'inherit-review-settings-ok' | 134 _INHERIT_SETTINGS = 'inherit-review-settings-ok' |
| 135 | 135 |
| 136 def testMembersChanged(self): | 136 def testMembersChanged(self): |
| 137 self.mox.ReplayAll() | 137 self.mox.ReplayAll() |
| 138 members = [ | 138 members = [ |
| 139 'AffectedFile', 'Change', 'DoGetTrySlaves', 'DoPresubmitChecks', | 139 'AffectedFile', 'Change', 'DoGetTrySlaves', 'DoPresubmitChecks', |
| 140 'GetTrySlavesExecuter', 'GitAffectedFile', | 140 'GetTrySlavesExecuter', 'GitAffectedFile', |
| 141 'GitChange', 'InputApi', 'ListRelevantPresubmitFiles', 'Main', | 141 'GitChange', 'InputApi', 'ListRelevantPresubmitFiles', 'Main', |
| 142 'OutputApi', 'ParseFiles', 'PresubmitFailure', | 142 'OutputApi', 'ParseFiles', 'PresubmitFailure', |
| 143 'PresubmitExecuter', 'PresubmitOutput', 'ScanSubDirs', | 143 'PresubmitExecuter', 'PresubmitOutput', 'ScanSubDirs', |
| 144 'SvnAffectedFile', 'SvnChange', 'cPickle', 'cStringIO', | 144 'SvnAffectedFile', 'SvnChange', 'copy', 'cPickle', 'cStringIO', |
| 145 'fix_encoding', 'fnmatch', 'gclient_utils', 'glob', 'json', | 145 'fix_encoding', 'fnmatch', 'gclient_utils', 'glob', 'json', |
| 146 'load_files', | 146 'load_files', |
| 147 'logging', 'marshal', 'normpath', 'optparse', 'os', 'owners', 'pickle', | 147 'logging', 'marshal', 'normpath', 'optparse', 'os', 'owners', 'pickle', |
| 148 'presubmit_canned_checks', 'random', 're', 'scm', 'subprocess', | 148 'presubmit_canned_checks', 'random', 're', 'scm', 'subprocess', |
| 149 'sys', 'tempfile', 'time', 'traceback', 'types', 'unittest', 'urllib2', | 149 'sys', 'tempfile', 'time', 'traceback', 'types', 'unittest', 'urllib2', |
| 150 'warn', | 150 'warn', |
| 151 ] | 151 ] |
| 152 # If this test fails, you should add the relevant test. | 152 # If this test fails, you should add the relevant test. |
| 153 self.compareMembers(presubmit, members) | 153 self.compareMembers(presubmit, members) |
| 154 | 154 |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 whitelist=['^a$', '^b$'], | 2119 whitelist=['^a$', '^b$'], |
| 2120 blacklist=['a']) | 2120 blacklist=['a']) |
| 2121 self.assertEqual(results, []) | 2121 self.assertEqual(results, []) |
| 2122 self.checkstdout( | 2122 self.checkstdout( |
| 2123 'Running %s\n' % presubmit.os.path.join('random_directory', 'b')) | 2123 'Running %s\n' % presubmit.os.path.join('random_directory', 'b')) |
| 2124 | 2124 |
| 2125 | 2125 |
| 2126 if __name__ == '__main__': | 2126 if __name__ == '__main__': |
| 2127 import unittest | 2127 import unittest |
| 2128 unittest.main() | 2128 unittest.main() |
| OLD | NEW |