Commit 78d65556 authored by dbeam@chromium.org's avatar dbeam@chromium.org

Remove unused PresubmitAddReviewers

R=dpranke@chromium.org
BUG=none

Review-Url: https://codereview.chromium.org/1960763002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300488 0039d316-1c4b-4281-b951-d872f2087c98
parent 7c29cd43
......@@ -156,18 +156,6 @@ class _PresubmitResult(object):
output.fail()
# Top level object so multiprocessing can pickle
# Public access through OutputApi object.
class _PresubmitAddReviewers(_PresubmitResult):
"""Add some suggested reviewers to the change."""
def __init__(self, reviewers):
super(_PresubmitAddReviewers, self).__init__('')
self.reviewers = reviewers
def handle(self, output):
output.reviewers.extend(self.reviewers)
# Top level object so multiprocessing can pickle
# Public access through OutputApi object.
class _PresubmitError(_PresubmitResult):
......@@ -270,7 +258,6 @@ class OutputApi(object):
can output various types of results.
"""
PresubmitResult = _PresubmitResult
PresubmitAddReviewers = _PresubmitAddReviewers
PresubmitError = _PresubmitError
PresubmitPromptWarning = _PresubmitPromptWarning
PresubmitNotifyResult = _PresubmitNotifyResult
......
......@@ -1594,9 +1594,9 @@ class OutputApiUnittest(PresubmitTestsBase):
def testMembersChanged(self):
self.mox.ReplayAll()
members = [
'MailTextResult', 'PresubmitAddReviewers', 'PresubmitError',
'PresubmitNotifyResult', 'PresubmitPromptWarning',
'PresubmitPromptOrNotify', 'PresubmitResult', 'is_committing',
'MailTextResult', 'PresubmitError', 'PresubmitNotifyResult',
'PresubmitPromptWarning', 'PresubmitPromptOrNotify', 'PresubmitResult',
'is_committing',
]
# If this test fails, you should add the relevant test.
self.compareMembers(presubmit.OutputApi(False), members)
......@@ -1613,22 +1613,11 @@ class OutputApiUnittest(PresubmitTestsBase):
self.failIf(presubmit.OutputApi.PresubmitNotifyResult('').fatal)
self.failIf(presubmit.OutputApi.PresubmitNotifyResult('').should_prompt)
self.failIf(presubmit.OutputApi.PresubmitAddReviewers(
['foo']).fatal)
self.failIf(presubmit.OutputApi.PresubmitAddReviewers(
['foo']).should_prompt)
# TODO(joi) Test MailTextResult once implemented.
def testOutputApiHandling(self):
self.mox.ReplayAll()
output = presubmit.PresubmitOutput()
presubmit.OutputApi.PresubmitAddReviewers(
['ben@example.com']).handle(output)
self.failUnless(output.should_continue())
self.failUnlessEqual(output.reviewers, ['ben@example.com'])
output = presubmit.PresubmitOutput()
presubmit.OutputApi.PresubmitError('!!!').handle(output)
self.failIf(output.should_continue())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment