Skip to content

Commit

Permalink
feat(tests): add workflow test in thematos
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Aug 14, 2023
1 parent 9f5b74a commit 8ae381f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/thematos/test_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""
test workflow
"""
import subprocess
from typing import List, Tuple


def capture(command: List[str]) -> Tuple[bytes, bytes, int]:
proc = subprocess.Popen(
command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
out, err = proc.communicate()
return out, err, proc.returncode


def test_cli_run_workflow() -> None:
"""Test cli command run_workflow"""
command = [
"poetry",
"run",
"thematos",
"+workflow=test",
]
out, err, exitcode = capture(command)
assert exitcode == 0


if __name__ == "__main__":
test_cli_run_workflow()

0 comments on commit 8ae381f

Please sign in to comment.