Skip to content

Commit

Permalink
Workaround to disable rich output to make testing on github actions e…
Browse files Browse the repository at this point in the history
…asier.

Co-authored-by: Piotr Kaznowski <[email protected]>
  • Loading branch information
filiplajszczak and caseneuve committed Jul 11, 2024
1 parent ee570da commit 7a2f5b3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/test_cli_pa.py
Original file line number Diff line number Diff line change
@@ -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()


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

0 comments on commit 7a2f5b3

Please sign in to comment.