Skip to content

Commit

Permalink
Strip trailing newline in cli test output
Browse files Browse the repository at this point in the history
The click.testing.CliRunner.invoke method now appends a newline
to the result string, making an invalid url.
  • Loading branch information
mdpiper committed Mar 25, 2024
1 parent a2fb65f commit a4e8ccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_valid_result():
["--jupyterhub-url=https://jupyter.org", "--repository-url=https://github.com"],
)
assert result.exit_code == 0
assert validators.url(result.output)
assert validators.url(result.output.rstrip("\n"))


def test_optional_interface():
Expand Down Expand Up @@ -154,4 +154,4 @@ def test_space_in_launch_path():
],
)
assert result.exit_code == 0
assert validators.url(result.output)
assert validators.url(result.output.rstrip("\n"))

0 comments on commit a4e8ccc

Please sign in to comment.