docs pass cli args as kwarg to test runner
This commit is contained in:
parent
5c0b9a6af3
commit
19d7a0ef78
1 changed files with 2 additions and 2 deletions
|
|
@ -265,10 +265,10 @@ command from the command line.
|
|||
click.echo(f"Hello, {name}!")
|
||||
|
||||
def test_hello_command(runner):
|
||||
result = runner.invoke(["hello"])
|
||||
result = runner.invoke(args="hello")
|
||||
assert "World" in result.output
|
||||
|
||||
result = runner.invoke(["hello", "--name", "Flask"])
|
||||
result = runner.invoke(args=["hello", "--name", "Flask"])
|
||||
assert "Flask" in result.output
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue