Skip to content

Commit

Permalink
✅ Fix tests for Click 7
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed May 2, 2023
1 parent 83cce68 commit ba312c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def test_call():
def test_call_no_args():
result = runner.invoke(app, ["--name"])
assert result.exit_code != 0
assert "Option '--name' requires an argument" in result.output
# TODO: when deprecating Click 7, remove second option
assert (
"Option '--name' requires an argument" in result.output
or "--name option requires an argument" in result.output
)


def test_script():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def test_call():
def test_call_no_args():
result = runner.invoke(app, ["--name"])
assert result.exit_code != 0
assert "Option '--name' requires an argument" in result.output
# TODO: when deprecating Click 7, remove second option
assert (
"Option '--name' requires an argument" in result.output
or "--name option requires an argument" in result.output
)


def test_script():
Expand Down

0 comments on commit ba312c5

Please sign in to comment.