def test_experimental_command_implicitly_execute(self):
     """ Ensure general warning displayed when running command from an experimental parent group. """
     self.cli_ctx.invoke('grp1 cmd1 -b b'.split())
     actual = self.io.getvalue()
     expected = "Command group 'grp1' is experimental and not covered by customer support. " \
                "Please use with discretion."
     self.assertIn(remove_space(expected), remove_space(actual))
    def test_experimental_arguments_command_help(self):
        """ Ensure experimental arguments appear correctly in command help view. """
        with self.assertRaises(SystemExit):
            self.cli_ctx.invoke('arg-test -h'.split())
        actual = self.io.getvalue()
        expected = """
Arguments
    --arg1 [Experimental] [Required] : Arg1.
        Argument '--arg1' is experimental and not covered by customer support. Please use with discretion.
""".format(self.cli_ctx.name)
        self.assertIn(remove_space(expected), remove_space(actual))
    def test_experimental_command_implicitly(self):
        """ Ensure help warning displayed for command in experimental because of a experimental parent group. """
        with self.assertRaises(SystemExit):
            self.cli_ctx.invoke('group1 cmd1 -h'.split())
        actual = self.io.getvalue()
        expected = """
Command
    {} group1 cmd1 : Short summary here.
        Long summary here. Still long summary.
        Command group 'group1' is experimental and not covered by customer support. Please use with discretion.
""".format(self.cli_ctx.name)
        self.assertIn(remove_space(expected), remove_space(actual))
    def test_experimental_command_group_help_plain(self):
        """ Ensure help warnings appear for experimental command group help. """
        with self.assertRaises(SystemExit):
            self.cli_ctx.invoke('group1 -h'.split())
        actual = self.io.getvalue()
        expected = """
Group
    cli group1 : A group.
        This command group is experimental and not covered by customer support. Please use with discretion.
Commands:
    cmd1 : Short summary here.

""".format(self.cli_ctx.name)
        self.assertIn(remove_space(expected), remove_space(actual))
 def test_experimental_command_plain_execute(self):
     """ Ensure general warning displayed when running experimental command. """
     self.cli_ctx.invoke('cmd1 -b b'.split())
     actual = self.io.getvalue()
     expected = "This command is experimental and not covered by customer support. Please use with discretion."
     self.assertIn(remove_space(expected), remove_space(actual))
Example #6
0
 def test_experimental_command_implicitly_execute(self):
     """ Ensure general warning displayed when running command from an experimental parent group. """
     self.cli_ctx.invoke('grp1 cmd1 -b b'.split())
     actual = self.io.getvalue()
     expected = "Command group 'grp1' is experimental and under development."
     self.assertIn(remove_space(expected), remove_space(actual))
Example #7
0
 def test_experimental_command_plain_execute(self):
     """ Ensure general warning displayed when running experimental command. """
     self.cli_ctx.invoke('cmd1 -b b'.split())
     actual = self.io.getvalue()
     expected = "This command is experimental and under development."
     self.assertIn(remove_space(expected), remove_space(actual))