def test_simple(self): help = HelpCommand() options = OptionsContext() for option in HelpCommand.common_options: options.add_option(option) context = CmdContext([], options, None, None) help.run(context)
def test_command(self): help = HelpCommand() options = OptionsContext() for option in HelpCommand.common_options: options.add_option(option) context = CmdContext(["configure"], options, None, None) context.options_registry = self.options_registry help.run(context)
def test_simple(self): help = HelpCommand() options = OptionsContext() for option in HelpCommand.common_options: options.add_option(option) global_context = GlobalContext(self.registry, None, None, None) context = HelpContext(global_context, [], options, None, None) help.run(context)
def register_commands(global_context): global_context.register_command("help", HelpCommand()) global_context.register_command("configure", ConfigureCommand()) global_context.register_command("build", BuildCommand()) global_context.register_command("install", InstallCommand()) global_context.register_command("convert", ConvertCommand()) global_context.register_command("sdist", SdistCommand()) global_context.register_command("build_egg", BuildEggCommand()) global_context.register_command("build_wininst", BuildWininstCommand()) global_context.register_command("sphinx", SphinxCommand()) global_context.register_command("register_pypi", RegisterPyPI()) global_context.register_command("upload_pypi", UploadPyPI()) global_context.register_command("build_pkg_info", BuildPkgInfoCommand(), public=False) global_context.register_command("parse", ParseCommand(), public=False) global_context.register_command("detect_type", DetectTypeCommand(), public=False) if sys.platform == "darwin": import bento.commands.build_mpkg global_context.register_command( "build_mpkg", bento.commands.build_mpkg.BuildMpkgCommand(), public=False) global_context.set_before("build_mpkg", "build") if sys.platform == "win32": from bento.commands.build_msi \ import \ BuildMsiCommand global_context.register_command("build_msi", BuildMsiCommand()) global_context.set_before("build_msi", "build")
def test_simple(self): help = HelpCommand() options = OptionsContext() for option in HelpCommand.common_options: options.add_option(option) global_context = GlobalContext(None, commands_registry=self.registry, options_registry=self.options_registry) pkg = PackageDescription() context = HelpContext(global_context, [], options, pkg, self.run_node) run_command_in_context(context, help)