Coverage for tests / test_prog_name.py: 100%

7 statements  

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

1import subprocess 1abcdefg

2import sys 1abcdefg

3from pathlib import Path 1abcdefg

4 

5 

6def test_custom_prog_name(): 1abcdefg

7 file_path = Path(__file__).parent / "assets/prog_name.py" 1abcdefg

8 result = subprocess.run( 1abcdefg

9 [sys.executable, "-m", "coverage", "run", str(file_path), "--help"], 

10 capture_output=True, 

11 encoding="utf-8", 

12 ) 

13 assert "Usage: custom-name [OPTIONS] I" in result.stdout 1abcdefg