Coverage for docs_src / testing / app01_py39 / test_main.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-02-09 12:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-02-09 12:36 +0000
1from typer.testing import CliRunner 1abcdefgh
3from .main import app 1abcdefgh
5runner = CliRunner() 1abcdefgh
8def test_app(): 1abcdefgh
9 result = runner.invoke(app, ["Camila", "--city", "Berlin"]) 1abcdefgh
10 assert result.exit_code == 0 1abcdefgh
11 assert "Hello Camila" in result.output 1abcdefgh
12 assert "Let's have a coffee in Berlin" in result.output 1abcdefgh