docs pass cli args as kwarg to test runner

This commit is contained in:
MeViMo 2022-04-08 18:29:42 +02:00 committed by David Lord
parent 5c0b9a6af3
commit 19d7a0ef78
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8

View file

@ -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