Coverage for tests/test_cli/test_app_other_name.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1import subprocess 1abcdefgh
2import sys 1abcdefgh
5def test_script_help(): 1abcdefgh
6 result = subprocess.run( 1abcdefgh
7 [
8 sys.executable,
9 "-m",
10 "coverage",
11 "run",
12 "-m",
13 "typer",
14 "tests/assets/cli/app_other_name.py",
15 "run",
16 "--help",
17 ],
18 capture_output=True,
19 encoding="utf-8",
20 )
21 assert "--name" in result.stdout 1abcdefgh
24def test_script(): 1abcdefgh
25 result = subprocess.run( 1abcdefgh
26 [
27 sys.executable,
28 "-m",
29 "coverage",
30 "run",
31 "-m",
32 "typer",
33 "tests/assets/cli/app_other_name.py",
34 "run",
35 "--name",
36 "Camila",
37 ],
38 capture_output=True,
39 encoding="utf-8",
40 )
41 assert "Hello Camila" in result.stdout 1abcdefgh