Skip to content

CliRunner.invoke(..., prog_name) not working #616

Description

@floomy

Trying to call CliRunner.invoke with the prog_name argument fails for me, any ideas? Thanks!

from click import argument, command, echo
from click.testing import CliRunner


@command()
@argument('greeting')
def main(greeting):
    echo(greeting)
>>> runner = CliRunner().invoke(main, args=['hello'])
>>> runner.exit_code
0
>>> runner.output
'hello\n'
>>> runner = CliRunner().invoke(main, args=['hello'], prog_name='foobar')
>>> runner.exit_code
-1
>>> runner.output
''

Python 3.5.2 with click 6.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions