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

10 statements  

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

1import typer 1abcdefghij

2from typer.testing import CliRunner 1abcdefghij

3 

4from .main import main 1abcdefghij

5 

6app = typer.Typer() 1abcdefghij

7app.command()(main) 1abcdefghij

8 

9runner = CliRunner() 1abcdefghij

10 

11 

12def test_app(): 1abcdefghij

13 result = runner.invoke(app, ["--name", "Camila"]) 1abcdefghij

14 assert result.exit_code == 0 1abcdefghij

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