Coverage for docs_src/testing/app03/test_main.py: 100%
10 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1import typer 1abcdefgh
2from typer.testing import CliRunner 1abcdefgh
4from .main import main 1abcdefgh
6app = typer.Typer() 1abcdefgh
7app.command()(main) 1abcdefgh
9runner = CliRunner() 1abcdefgh
12def test_app(): 1abcdefgh
13 result = runner.invoke(app, ["--name", "Camila"]) 1abcdefgh
14 assert result.exit_code == 0 1abcdefgh
15 assert "Hello Camila" in result.stdout 1abcdefgh