Coverage for docs_src / testing / app01 / test_main.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-11-18 11:12 +0000

1from typer.testing import CliRunner 1abcdefghij

2 

3from .main import app 1abcdefghij

4 

5runner = CliRunner() 1abcdefghij

6 

7 

8def test_app(): 1abcdefghij

9 result = runner.invoke(app, ["Camila", "--city", "Berlin"]) 1abcdefghij

10 assert result.exit_code == 0 1abcdefghij

11 assert "Hello Camila" in result.output 1abcdefghij

12 assert "Let's have a coffee in Berlin" in result.output 1abcdefghij