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