Newer
Older
import sys
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)
def test_cli_sanity():
output = run_command("run", '"ls -ltr /"')
print(output.decode().rstrip())
assert len(output) > 20, "Too little output"
if __name__ == "__main__":
test_cli_sanity()