diff --git a/tests/test_cli_pa.py b/tests/test_cli_pa.py index 9e6bd67..a722972 100644 --- a/tests/test_cli_pa.py +++ b/tests/test_cli_pa.py @@ -1,7 +1,11 @@ +import typer.core + from typer.testing import CliRunner from cli.pa import app +typer.core.rich = None # Workaround to disable rich output to make testing on github actions easier +# TODO: remove this workaround runner = CliRunner() @@ -11,13 +15,10 @@ def test_main_command_without_args_prints_help(): [], ) assert result.exit_code == 0 - tidied_output = " ".join([line.replace("│", "").strip() for line in result.output.split("\n")]) - assert "This is a new experimental PythonAnywhere cli client." in tidied_output - assert "Makes Django Girls tutorial projects deployment easy" in tidied_output - assert "Perform some operations on files" in tidied_output - assert "Manage scheduled tasks" in tidied_output - assert "Perform some operations on students" in tidied_output - assert "Everything for web apps: use this if you're not using our experimental features" in tidied_output - assert "EXPERIMENTAL: create and manage ASGI websites" in tidied_output - - + assert "This is a new experimental PythonAnywhere cli client." in result.stdout + assert "Makes Django Girls tutorial projects deployment easy" in result.stdout + assert "Perform some operations on files" in result.stdout + assert "Manage scheduled tasks" in result.stdout + assert "Perform some operations on students" in result.stdout + assert "Everything for web apps: use this if you're not using" in result.stdout + assert "EXPERIMENTAL: create and manage ASGI websites" in result.stdout