Coverage for tests/test_prog_name.py: 100%
7 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-04-14 00:18 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2025-04-14 00:18 +0000
1import subprocess 1abcdefghi
2import sys 1abcdefghi
3from pathlib import Path 1abcdefghi
6def test_custom_prog_name(): 1abcdefghi
7 file_path = Path(__file__).parent / "assets/prog_name.py" 1abcdefghi
8 result = subprocess.run( 1abcdefghi
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 1abcdefghi