Skip to content
Snippets Groups Projects
Commit a6bce64d authored by dilawar's avatar dilawar :ant:
Browse files

chore (ci): Use the module

parent 80390649
Branches main
Tags v0.2.3
1 merge request!2version 0.2.0
Pipeline #3740 failed with stages
in 1 minute and 57 seconds
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 `{shlex.split(cmd)}`")
assert Path(sys.executable).is_file()
p = subprocess.run(shlex.split(cmd), capture_output=True)
return p.stdout
from bitia.__main__ import run_pipeline
def test_cli_sanity():
output = run_command("run", '"ls -ltr /"')
print(output.decode().rstrip())
assert len(output) > 20, "Too little output"
for line in run_pipeline("ls -ltr /"):
print(line)
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment