Coverage for tests/test_cli/test_completion_run.py: 100%
6 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 os 1abcdefghi
2import subprocess 1abcdefghi
3import sys 1abcdefghi
6def test_script_completion_run(): 1abcdefghi
7 result = subprocess.run( 1abcdefghi
8 [sys.executable, "-m", "coverage", "run", "-m", "typer"],
9 capture_output=True,
10 encoding="utf-8",
11 env={
12 **os.environ,
13 "___MAIN__.PY_COMPLETE": "complete_bash",
14 "_PYTHON _M TYPER_COMPLETE": "complete_bash",
15 "COMP_WORDS": "typer tests/assets/cli/sample.py",
16 "COMP_CWORD": "2",
17 },
18 )
19 assert "run" in result.stdout 1abcdefghi