diff --git a/tests/test_cli.py b/tests/test_cli.py index 30ab3b4442741ca02beb1c107d0572f0c35b2809..89ffb9be2b6c375051298f116b932eb7b8deded6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,11 +1,15 @@ import sys +import shlex +from pathlib import Path import subprocess def run_command(cmd: str, args: str): cmd = f"{sys.executable} -m bitia {cmd} {args}" - print(f"Executing `{cmd}`") - return subprocess.check_output(cmd) + print(f"Executing `{shlex.split(cmd)}`") + assert Path(sys.executable).is_file() + p = subprocess.run(shlex.split(cmd), capture_output=True) + return p.stdout def test_cli_sanity():