From a4e8ccca0697bf424d8393ce2cda1e05a420b9f7 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 12:26:51 -0600 Subject: [PATCH] Strip trailing newline in cli test output The click.testing.CliRunner.invoke method now appends a newline to the result string, making an invalid url. --- tests/test_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ce0c07c..cbf5e5a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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(): @@ -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"))