OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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,W0212,W0403 | 9 # pylint: disable=E1101,E1103,W0212,W0403 |
10 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 def testMembersChanged(self): | 135 def testMembersChanged(self): |
136 self.mox.ReplayAll() | 136 self.mox.ReplayAll() |
137 members = [ | 137 members = [ |
138 'AffectedFile', 'Change', 'DoGetTrySlaves', 'DoPresubmitChecks', | 138 'AffectedFile', 'Change', 'DoGetTrySlaves', 'DoPresubmitChecks', |
139 'GetTrySlavesExecuter', 'GitAffectedFile', | 139 'GetTrySlavesExecuter', 'GitAffectedFile', |
140 'GitChange', 'InputApi', 'ListRelevantPresubmitFiles', 'Main', | 140 'GitChange', 'InputApi', 'ListRelevantPresubmitFiles', 'Main', |
141 'NotImplementedException', 'OutputApi', 'ParseFiles', | 141 'NotImplementedException', 'OutputApi', 'ParseFiles', |
142 'PresubmitExecuter', 'PresubmitOutput', 'ScanSubDirs', | 142 'PresubmitExecuter', 'PresubmitOutput', 'ScanSubDirs', |
143 'SvnAffectedFile', 'SvnChange', 'cPickle', 'cStringIO', | 143 'SvnAffectedFile', 'SvnChange', 'cPickle', 'cStringIO', |
144 'exceptions', 'fnmatch', 'gclient_utils', 'glob', 'json', 'load_files', | 144 'exceptions', 'fix_encoding', 'fnmatch', 'gclient_utils', 'glob', 'json', |
| 145 'load_files', |
145 'logging', 'marshal', 'normpath', 'optparse', 'os', 'owners', 'pickle', | 146 'logging', 'marshal', 'normpath', 'optparse', 'os', 'owners', 'pickle', |
146 'presubmit_canned_checks', 'random', 're', 'scm', 'subprocess', | 147 'presubmit_canned_checks', 'random', 're', 'scm', 'subprocess', |
147 'sys', 'tempfile', 'time', 'traceback', 'types', 'unittest', 'urllib2', | 148 'sys', 'tempfile', 'time', 'traceback', 'types', 'unittest', 'urllib2', |
148 'warn', | 149 'warn', |
149 ] | 150 ] |
150 # If this test fails, you should add the relevant test. | 151 # If this test fails, you should add the relevant test. |
151 self.compareMembers(presubmit, members) | 152 self.compareMembers(presubmit, members) |
152 | 153 |
153 def testListRelevantPresubmitFiles(self): | 154 def testListRelevantPresubmitFiles(self): |
154 join = presubmit.os.path.join | 155 join = presubmit.os.path.join |
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 | 1968 |
1968 def testCannedCheckOwners_HTTPS_HostURL(self): | 1969 def testCannedCheckOwners_HTTPS_HostURL(self): |
1969 self.OwnersTest(is_committing=True, | 1970 self.OwnersTest(is_committing=True, |
1970 approvers=set(['ben@example.com']), | 1971 approvers=set(['ben@example.com']), |
1971 uncovered_files=set(), host_url='https://localhost') | 1972 uncovered_files=set(), host_url='https://localhost') |
1972 | 1973 |
1973 | 1974 |
1974 if __name__ == '__main__': | 1975 if __name__ == '__main__': |
1975 import unittest | 1976 import unittest |
1976 unittest.main() | 1977 unittest.main() |
OLD | NEW |