Changeset 148360 in webkit
- Timestamp:
- Apr 13, 2013 10:39:30 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r148355 r148360 1 2013-04-13 Ryosuke Niwa <rniwa@webkit.org> 2 3 Merge AbstractDeclarativeCommand into Command as a comment suggests 4 https://bugs.webkit.org/show_bug.cgi?id=114559 5 6 Reviewed by Antti Koivisto. 7 8 Merged two classes as the comment right above AbstractDeclarativeCommand suggested. 9 We need to merge a lot more classes to make webkitpy hackable. 10 11 * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: 12 (AbstractLocalServerCommand): 13 (AbstractLocalServerCommand.__init__): 14 * Scripts/webkitpy/tool/commands/abstractsequencedcommand.py: 15 (AbstractSequencedCommand): 16 (AbstractSequencedCommand.__init__): 17 * Scripts/webkitpy/tool/commands/adduserstogroups.py: 18 (AddUsersToGroups): 19 * Scripts/webkitpy/tool/commands/analyzechangelog.py: 20 (AnalyzeChangeLog): 21 (AnalyzeChangeLog.__init__): 22 * Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py: 23 * Scripts/webkitpy/tool/commands/bugfortest.py: 24 (BugForTest): 25 * Scripts/webkitpy/tool/commands/bugsearch.py: 26 (BugSearch): 27 * Scripts/webkitpy/tool/commands/chromechannels.py: 28 (ChromeChannels): 29 (__init__): 30 * Scripts/webkitpy/tool/commands/download.py: 31 (AbstractPatchProcessingCommand): 32 * Scripts/webkitpy/tool/commands/findusers.py: 33 (FindUsers): 34 * Scripts/webkitpy/tool/commands/openbugs.py: 35 (OpenBugs): 36 * Scripts/webkitpy/tool/commands/queries.py: 37 (BugsToCommit): 38 (PatchesInCommitQueue): 39 (PatchesToCommitQueue): 40 (PatchesToCommitQueue.__init__): 41 (PatchesToReview): 42 (PatchesToReview.__init__): 43 (PatchesToReview.execute): 44 (WhatBroke): 45 (ResultsFor): 46 (FailureReason): 47 (FindFlakyTests): 48 (TreeStatus): 49 (CrashLog): 50 (PrintExpectations): 51 (PrintExpectations.__init__): 52 (PrintBaselines): 53 (PrintBaselines.__init__): 54 * Scripts/webkitpy/tool/commands/queues.py: 55 (AbstractQueue.__init__): 56 * Scripts/webkitpy/tool/commands/rebaseline.py: 57 (AbstractRebaseliningCommand): 58 * Scripts/webkitpy/tool/commands/suggestnominations.py: 59 (SuggestNominations): 60 (SuggestNominations.__init__): 61 * Scripts/webkitpy/tool/commands/upload.py: 62 (CommitMessageForCurrentDiff): 63 (CommitMessageForCurrentDiff.__init__): 64 (CleanPendingCommit): 65 (CleanReviewQueue): 66 (AssignToCommitter): 67 (PostCommits): 68 (PostCommits.__init__): 69 (MarkBugFixed): 70 (MarkBugFixed.__init__): 71 (CreateBug): 72 (CreateBug.__init__): 73 * Scripts/webkitpy/tool/multicommandtool.py: 74 (Command): 75 (Command.__init__): 76 (Command.main): 77 (HelpCommand): 78 (HelpCommand.__init__): 79 * Scripts/webkitpy/tool/multicommandtool_unittest.py: 80 (TrivialCommand): 81 (TrivialCommand.__init__): 82 (LikesToRetry): 83 (LikesToRetry.__init__): 84 (CommandTest.test_name_with_arguments): 85 (CommandTest.test_required_arguments): 86 (test_command_help): 87 1 88 2013-04-13 Ed Bartosh <bartosh@gmail.com> 2 89 -
trunk/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py
r140508 r148360 26 26 import threading 27 27 28 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand28 from webkitpy.tool.multicommandtool import Command 29 29 30 30 31 class AbstractLocalServerCommand( AbstractDeclarativeCommand):31 class AbstractLocalServerCommand(Command): 32 32 server = None 33 33 launch_path = "/" … … 38 38 make_option("--no-show-results", action="store_false", default=True, dest="show_results", help="Don't launch a browser with the rebaseline server"), 39 39 ] 40 AbstractDeclarativeCommand.__init__(self, options=options)40 Command.__init__(self, options=options) 41 41 42 42 def _prepare_config(self, options, args, tool): -
trunk/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py
r135744 r148360 31 31 from webkitpy.common.system.executive import ScriptError 32 32 from webkitpy.tool.commands.stepsequence import StepSequence 33 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand33 from webkitpy.tool.multicommandtool import Command 34 34 35 35 _log = logging.getLogger(__name__) 36 36 37 37 38 class AbstractSequencedCommand( AbstractDeclarativeCommand):38 class AbstractSequencedCommand(Command): 39 39 steps = None 40 40 def __init__(self): 41 41 self._sequence = StepSequence(self.steps) 42 AbstractDeclarativeCommand.__init__(self, self._sequence.options())42 Command.__init__(self, self._sequence.options()) 43 43 44 44 def _prepare_state(self, options, args, tool): -
trunk/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py
r95238 r148360 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand29 from webkitpy.tool.multicommandtool import Command 30 30 31 31 32 class AddUsersToGroups( AbstractDeclarativeCommand):32 class AddUsersToGroups(Command): 33 33 name = "add-users-to-groups" 34 34 help_text = "Add users matching subtring to specified groups" -
trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
r107136 r148360 36 36 from webkitpy.common.system.filesystem import FileSystem 37 37 from webkitpy.common.system.executive import Executive 38 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand38 from webkitpy.tool.multicommandtool import Command 39 39 from webkitpy.tool import steps 40 40 41 41 42 class AnalyzeChangeLog( AbstractDeclarativeCommand):42 class AnalyzeChangeLog(Command): 43 43 name = "analyze-changelog" 44 44 help_text = "Experimental command for analyzing change logs." … … 49 49 steps.Options.changelog_count, 50 50 ] 51 AbstractDeclarativeCommand.__init__(self, options=options)51 Command.__init__(self, options=options) 52 52 53 53 @staticmethod -
trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py
r103959 r148360 37 37 from webkitpy.tool.commands.analyzechangelog import ChangeLogAnalyzer 38 38 from webkitpy.tool.commands.commandtest import CommandsTest 39 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand39 from webkitpy.tool.multicommandtool import Command 40 40 41 41 -
trunk/Tools/Scripts/webkitpy/tool/commands/bugfortest.py
r74138 r148360 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand29 from webkitpy.tool.multicommandtool import Command 30 30 from webkitpy.tool.bot.flakytestreporter import FlakyTestReporter 31 31 … … 34 34 # it could be easily expanded to auto-create bugs, etc. if another 35 35 # command outside of webkitpy wanted to use it. 36 class BugForTest( AbstractDeclarativeCommand):36 class BugForTest(Command): 37 37 name = "bug-for-test" 38 38 help_text = "Finds the bugzilla bug for a given test" -
trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py
r116414 r148360 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand29 from webkitpy.tool.multicommandtool import Command 30 30 31 31 32 class BugSearch( AbstractDeclarativeCommand):32 class BugSearch(Command): 33 33 name = "bug-search" 34 34 help_text = "List bugs matching a query" -
trunk/Tools/Scripts/webkitpy/tool/commands/chromechannels.py
r116414 r148360 30 30 31 31 from webkitpy.common.net.omahaproxy import OmahaProxy 32 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand32 from webkitpy.tool.multicommandtool import Command 33 33 34 34 import re 35 35 36 36 37 class ChromeChannels( AbstractDeclarativeCommand):37 class ChromeChannels(Command): 38 38 name = "chrome-channels" 39 39 help_text = "List which chrome channels include the patches in bugs returned by QUERY." … … 54 54 55 55 def __init__(self): 56 AbstractDeclarativeCommand.__init__(self)56 Command.__init__(self) 57 57 self._re_committed = re.compile(self.commited_pattern) 58 58 self._re_rollout = re.compile(self.rollout_pattern) -
trunk/Tools/Scripts/webkitpy/tool/commands/download.py
r140508 r148360 39 39 from webkitpy.tool.comments import bug_comment_from_commit_text 40 40 from webkitpy.tool.grammar import pluralize 41 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand41 from webkitpy.tool.multicommandtool import Command 42 42 43 43 _log = logging.getLogger(__name__) … … 146 146 147 147 148 class AbstractPatchProcessingCommand( AbstractDeclarativeCommand):148 class AbstractPatchProcessingCommand(Command): 149 149 # Subclasses must implement the methods below. We don't declare them here 150 150 # because we want to be able to implement them with mix-ins. -
trunk/Tools/Scripts/webkitpy/tool/commands/findusers.py
r95238 r148360 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand29 from webkitpy.tool.multicommandtool import Command 30 30 31 31 32 class FindUsers( AbstractDeclarativeCommand):32 class FindUsers(Command): 33 33 name = "find-users" 34 34 help_text = "Find users matching substring" -
trunk/Tools/Scripts/webkitpy/tool/commands/openbugs.py
r135744 r148360 31 31 import sys 32 32 33 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand33 from webkitpy.tool.multicommandtool import Command 34 34 35 35 _log = logging.getLogger(__name__) 36 36 37 37 38 class OpenBugs( AbstractDeclarativeCommand):38 class OpenBugs(Command): 39 39 name = "open-bugs" 40 40 help_text = "Finds all bug numbers passed in arguments (or stdin if no args provided) and opens them in a web browser" -
trunk/Tools/Scripts/webkitpy/tool/commands/queries.py
r143033 r148360 47 47 from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCommand 48 48 from webkitpy.tool.grammar import pluralize 49 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand49 from webkitpy.tool.multicommandtool import Command 50 50 from webkitpy.layout_tests.models.test_expectations import TestExpectations 51 51 from webkitpy.layout_tests.port import platform_options, configuration_options … … 65 65 66 66 67 class BugsToCommit( AbstractDeclarativeCommand):67 class BugsToCommit(Command): 68 68 name = "bugs-to-commit" 69 69 help_text = "List bugs in the commit-queue" … … 76 76 77 77 78 class PatchesInCommitQueue( AbstractDeclarativeCommand):78 class PatchesInCommitQueue(Command): 79 79 name = "patches-in-commit-queue" 80 80 help_text = "List patches in the commit-queue" … … 87 87 88 88 89 class PatchesToCommitQueue( AbstractDeclarativeCommand):89 class PatchesToCommitQueue(Command): 90 90 name = "patches-to-commit-queue" 91 91 help_text = "Patches which should be added to the commit queue" … … 94 94 make_option("--bugs", action="store_true", dest="bugs", help="Output bug links instead of patch links"), 95 95 ] 96 AbstractDeclarativeCommand.__init__(self, options=options)96 Command.__init__(self, options=options) 97 97 98 98 @staticmethod … … 121 121 122 122 123 class PatchesToReview( AbstractDeclarativeCommand):123 class PatchesToReview(Command): 124 124 name = "patches-to-review" 125 125 help_text = "List bugs which have attachments pending review" … … 134 134 help="Specifies the email on the CC field (defaults to your bugzilla login email)"), 135 135 ] 136 AbstractDeclarativeCommand.__init__(self, options=options)136 Command.__init__(self, options=options) 137 137 138 138 def _print_report(self, report, cc_email, print_all): … … 174 174 self._print_report(report, cc_email, options.all) 175 175 176 class WhatBroke(AbstractDeclarativeCommand): 176 177 class WhatBroke(Command): 177 178 name = "what-broke" 178 179 help_text = "Print failing buildbots (%s) and what revisions broke them" % config_urls.buildbot_url … … 220 221 221 222 222 class ResultsFor( AbstractDeclarativeCommand):223 class ResultsFor(Command): 223 224 name = "results-for" 224 225 help_text = "Print a list of failures for the passed revision from bots on %s" % config_urls.buildbot_url … … 242 243 243 244 244 class FailureReason( AbstractDeclarativeCommand):245 class FailureReason(Command): 245 246 name = "failure-reason" 246 247 help_text = "Lists revisions where individual test failures started at %s" % config_urls.buildbot_url … … 328 329 329 330 330 class FindFlakyTests( AbstractDeclarativeCommand):331 class FindFlakyTests(Command): 331 332 name = "find-flaky-tests" 332 333 help_text = "Lists tests that often fail for a single build at %s" % config_urls.buildbot_url … … 397 398 398 399 399 class TreeStatus( AbstractDeclarativeCommand):400 class TreeStatus(Command): 400 401 name = "tree-status" 401 402 help_text = "Print the status of the %s buildbots" % config_urls.buildbot_url … … 409 410 410 411 411 class CrashLog( AbstractDeclarativeCommand):412 class CrashLog(Command): 412 413 name = "crash-log" 413 414 help_text = "Print the newest crash log for the given process" … … 424 425 425 426 426 class PrintExpectations( AbstractDeclarativeCommand):427 class PrintExpectations(Command): 427 428 name = 'print-expectations' 428 429 help_text = 'Print the expected result for the given test(s) on the given port(s)' … … 444 445 ] + platform_options(use_globs=True) 445 446 446 AbstractDeclarativeCommand.__init__(self, options=options)447 Command.__init__(self, options=options) 447 448 self._expectation_models = {} 448 449 … … 515 516 516 517 517 class PrintBaselines( AbstractDeclarativeCommand):518 class PrintBaselines(Command): 518 519 name = 'print-baselines' 519 520 help_text = 'Prints the baseline locations for given test(s) on the given port(s)' … … 528 529 help='Include virtual tests'), 529 530 ] + platform_options(use_globs=True) 530 AbstractDeclarativeCommand.__init__(self, options=options)531 Command.__init__(self, options=options) 531 532 self._platform_regexp = re.compile('platform/([^\/]+)/(.+)') 532 533 -
trunk/Tools/Scripts/webkitpy/tool/commands/queues.py
r148352 r148360 73 73 make_option("--exit-after-iteration", action="store", type="int", dest="iterations", default=None, help="Stop running the queue after iterating this number of times."), 74 74 ] 75 Command.__init__(self, "Run the %s" % self.name, options=options_list) 75 self.help_text = "Run the %s" % self.name 76 Command.__init__(self, options=options_list) 76 77 self._iteration_count = 0 77 78 -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
r148352 r148360 39 39 from webkitpy.layout_tests.port import builders 40 40 from webkitpy.layout_tests.port import factory 41 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand41 from webkitpy.tool.multicommandtool import Command 42 42 43 43 … … 50 50 51 51 52 class AbstractRebaseliningCommand( AbstractDeclarativeCommand):52 class AbstractRebaseliningCommand(Command): 53 53 # not overriding execute() - pylint: disable=W0223 54 54 -
trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py
r97891 r148360 35 35 from webkitpy.tool import steps 36 36 from webkitpy.tool.grammar import join_with_separators 37 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand38 39 40 class SuggestNominations( AbstractDeclarativeCommand):37 from webkitpy.tool.multicommandtool import Command 38 39 40 class SuggestNominations(Command): 41 41 name = "suggest-nominations" 42 42 help_text = "Suggest contributors for committer/reviewer nominations" … … 50 50 ] 51 51 52 AbstractDeclarativeCommand.__init__(self, options=options)52 Command.__init__(self, options=options) 53 53 # FIXME: This should probably be on the tool somewhere. 54 54 self._committer_list = CommitterList() -
trunk/Tools/Scripts/webkitpy/tool/commands/upload.py
r140674 r148360 44 44 from webkitpy.tool.comments import bug_comment_from_svn_revision 45 45 from webkitpy.tool.grammar import pluralize, join_with_separators 46 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand46 from webkitpy.tool.multicommandtool import Command 47 47 48 48 _log = logging.getLogger(__name__) 49 49 50 50 51 class CommitMessageForCurrentDiff( AbstractDeclarativeCommand):51 class CommitMessageForCurrentDiff(Command): 52 52 name = "commit-message" 53 53 help_text = "Print a commit message suitable for the uncommitted changes" … … 57 57 steps.Options.git_commit, 58 58 ] 59 AbstractDeclarativeCommand.__init__(self, options=options)59 Command.__init__(self, options=options) 60 60 61 61 def execute(self, options, args, tool): … … 65 65 66 66 67 class CleanPendingCommit( AbstractDeclarativeCommand):67 class CleanPendingCommit(Command): 68 68 name = "clean-pending-commit" 69 69 help_text = "Clear r+ on obsolete patches so they do not appear in the pending-commit list." … … 95 95 96 96 # FIXME: This should be share more logic with AssignToCommitter and CleanPendingCommit 97 class CleanReviewQueue( AbstractDeclarativeCommand):97 class CleanReviewQueue(Command): 98 98 name = "clean-review-queue" 99 99 help_text = "Clear r? on obsolete patches so they do not appear in the pending-review list." … … 120 120 121 121 122 class AssignToCommitter( AbstractDeclarativeCommand):122 class AssignToCommitter(Command): 123 123 name = "assign-to-committer" 124 124 help_text = "Assign bug to whoever attached the most recent r+'d patch" … … 307 307 308 308 309 class PostCommits( AbstractDeclarativeCommand):309 class PostCommits(Command): 310 310 name = "post-commits" 311 311 help_text = "Attach a range of local commits to bugs as patch files" … … 321 321 steps.Options.request_commit, 322 322 ] 323 AbstractDeclarativeCommand.__init__(self, options=options, requires_local_commits=True)323 Command.__init__(self, options=options, requires_local_commits=True) 324 324 325 325 def _comment_text_for_commit(self, options, commit_message, tool, commit_id): … … 359 359 360 360 # FIXME: This command needs to be brought into the modern age with steps and CommitInfo. 361 class MarkBugFixed( AbstractDeclarativeCommand):361 class MarkBugFixed(Command): 362 362 name = "mark-bug-fixed" 363 363 help_text = "Mark the specified bug as fixed" … … 370 370 make_option("--update-only", action="store_true", default=False, dest="update_only", help="Add comment to the bug, but do not close it."), 371 371 ] 372 AbstractDeclarativeCommand.__init__(self, options=options)372 Command.__init__(self, options=options) 373 373 374 374 # FIXME: We should be using checkout().changelog_entries_for_revision(...) instead here. … … 440 440 441 441 # FIXME: Requires unit test. Blocking issue: too complex for now. 442 class CreateBug( AbstractDeclarativeCommand):442 class CreateBug(Command): 443 443 name = "create-bug" 444 444 help_text = "Create a bug from local changes or local commits" … … 453 453 make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."), 454 454 ] 455 AbstractDeclarativeCommand.__init__(self, options=options)455 Command.__init__(self, options=options) 456 456 457 457 def create_bug_from_commit(self, options, args, tool): -
trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py
r135744 r148360 49 49 name = None 50 50 show_in_main_help = False 51 def __init__(self, help_text, argument_names=None, options=None, long_help=None, requires_local_commits=False): 52 self.help_text = help_text 53 self.long_help = long_help 54 self.argument_names = argument_names 55 self.required_arguments = self._parse_required_arguments(argument_names) 51 help_text = None 52 long_help = None 53 argument_names = None 54 55 def __init__(self, options=None, requires_local_commits=False): 56 self.required_arguments = self._parse_required_arguments(self.argument_names) 56 57 self.options = options 57 58 self.requires_local_commits = requires_local_commits … … 140 141 141 142 142 # FIXME: This should just be rolled into Command. help_text and argument_names do not need to be instance variables.143 class AbstractDeclarativeCommand(Command):144 help_text = None145 argument_names = None146 long_help = None147 def __init__(self, options=None, **kwargs):148 Command.__init__(self, self.help_text, self.argument_names, options=options, long_help=self.long_help, **kwargs)149 150 151 143 class HelpPrintingOptionParser(OptionParser): 152 144 def __init__(self, epilog_method=None, *args, **kwargs): … … 169 161 170 162 171 class HelpCommand( AbstractDeclarativeCommand):163 class HelpCommand(Command): 172 164 name = "help" 173 165 help_text = "Display information about this program or its subcommands" … … 178 170 make_option("-a", "--all-commands", action="store_true", dest="show_all_commands", help="Print all available commands"), 179 171 ] 180 AbstractDeclarativeCommand.__init__(self, options)172 Command.__init__(self, options) 181 173 self.show_all_commands = False # A hack used to pass --all-commands to _help_epilog even though it's called by the OptionParser. 182 174 -
trunk/Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py
r140510 r148360 39 39 name = "trivial" 40 40 show_in_main_help = True 41 help_text = "help text" 41 42 def __init__(self, **kwargs): 42 Command.__init__(self, "help text",**kwargs)43 Command.__init__(self, **kwargs) 43 44 44 45 def execute(self, options, args, tool): … … 54 55 name = "likes-to-retry" 55 56 show_in_main_help = True 57 help_text = "help text" 56 58 57 59 def __init__(self, **kwargs): 58 Command.__init__(self, "help text",**kwargs)60 Command.__init__(self, **kwargs) 59 61 self.execute_count = 0 60 62 … … 67 69 class CommandTest(unittest.TestCase): 68 70 def test_name_with_arguments(self): 69 command_with_args = TrivialCommand(argument_names="ARG1 ARG2") 71 TrivialCommand.argument_names = "ARG1 ARG2" 72 command_with_args = TrivialCommand() 70 73 self.assertEqual(command_with_args.name_with_arguments(), "trivial ARG1 ARG2") 71 74 75 TrivialCommand.argument_names = None 72 76 command_with_args = TrivialCommand(options=[make_option("--my_option")]) 73 77 self.assertEqual(command_with_args.name_with_arguments(), "trivial [options]") … … 81 85 82 86 def test_required_arguments(self): 83 two_required_arguments = TrivialCommand(argument_names="ARG1 ARG2 [ARG3]") 87 TrivialCommand.argument_names = "ARG1 ARG2 [ARG3]" 88 two_required_arguments = TrivialCommand() 84 89 expected_logs = "2 arguments required, 1 argument provided. Provided: 'foo' Required: ARG1 ARG2\nSee 'trivial-tool help trivial' for usage.\n" 85 90 exit_code = OutputCapture().assert_outputs(self, two_required_arguments.check_arguments_and_execute, [None, ["foo"], TrivialTool()], expected_logs=expected_logs) … … 168 173 169 174 def test_command_help(self): 170 command_with_options = TrivialCommand(options=[make_option("--my_option")], long_help="LONG HELP") 175 command_with_options = TrivialCommand(options=[make_option("--my_option")]) 176 command_with_options.long_help = "LONG HELP" 171 177 tool = TrivialTool(commands=[command_with_options]) 172 178 expected_subcommand_help = "trivial [options] help text\n\nLONG HELP\n\nOptions:\n --my_option=MY_OPTION\n\n"
Note: See TracChangeset
for help on using the changeset viewer.