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

8 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 18:26 +0000

1from typer.testing import CliRunner 1abcdefgh

2 

3from .main import app 1abcdefgh

4 

5runner = CliRunner() 1abcdefgh

6 

7 

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.stdout 1abcdefgh

12 assert "Let's have a coffee in Berlin" in result.stdout 1abcdefgh