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

7 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"], input="camila@example.com\n") 1abcdefgh

10 assert result.exit_code == 0 1abcdefgh

11 assert "Hello Camila, your email is: camila@example.com" in result.stdout 1abcdefgh