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

chore (ci): Use the module

parent 80390649
No related branches found
No related tags found
1 merge request!2version 0.2.0
Pipeline #3740 failed with stages
in 1 minute and 57 seconds
import sys from bitia.__main__ import run_pipeline
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
def test_cli_sanity(): def test_cli_sanity():
output = run_command("run", '"ls -ltr /"') for line in run_pipeline("ls -ltr /"):
print(output.decode().rstrip()) print(line)
assert len(output) > 20, "Too little output"
if __name__ == "__main__": 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