Coverage for tests/test_cli/test_sub_completion.py: 100%
6 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1import os 1abcdefgh
2import subprocess 1abcdefgh
3import sys 1abcdefgh
6def test_script_completion_run(): 1abcdefgh
7 result = subprocess.run( 1abcdefgh
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 run hello --",
16 "COMP_CWORD": "4",
17 },
18 )
19 assert "--name" in result.stdout 1abcdefgh