Coverage for tests / test_cli / test_sub_help.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-03-26 21:46 +0000

1import subprocess 1abcdefg

2import sys 1abcdefg

3 

4 

5def test_script_help(): 1abcdefg

6 result = subprocess.run( 1abcdefg

7 [ 

8 sys.executable, 

9 "-m", 

10 "coverage", 

11 "run", 

12 "-m", 

13 "typer", 

14 "tests/assets/cli/sample.py", 

15 "run", 

16 "--help", 

17 ], 

18 capture_output=True, 

19 encoding="utf-8", 

20 ) 

21 assert "bye" in result.stdout 1abcdefg

22 assert "Say bye" in result.stdout 1abcdefg

23 assert "hello" in result.stdout 1abcdefg

24 assert "Say hi" in result.stdout 1abcdefg