[webkit-reviews] review granted: [Bug 106754] Sheriffbot command aliases need test cases : [Attachment 182518] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jan 13 23:54:19 PST 2013
Eric Seidel <eric at webkit.org> has granted Alan Cutter
<alancutter at chromium.org>'s request for review:
Bug 106754: Sheriffbot command aliases need test cases
https://bugs.webkit.org/show_bug.cgi?id=106754
Attachment 182518: Patch
https://bugs.webkit.org/attachment.cgi?id=182518&action=review
------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=182518&action=review
> Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:42
> + tool = MockTool()
> + options = MockOptions()
> + options.ensure_value("confirm", False)
> + sheriffbot = SheriffBot()
> + sheriffbot.execute(options, [], tool, MockQueueEngine)
> + sheriffbot.begin_work_queue()
Next time we add tests, this should probably move to a setUp() method (which is
automatically called for you)
> Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:46
> + revert_command, args = irc_bot._parse_command_and_args("revert")
> + self.assertEqual(revert_command, Rollout)
I often add a _assertCommandNamed(name, command) or similar helper method when
the asserts take more than one line to execute.
More information about the webkit-reviews
mailing list