Skip to content

Commit

Permalink
search
Browse files Browse the repository at this point in the history
Signed-off-by: Samhita Alla <[email protected]>
  • Loading branch information
samhita-alla committed Dec 1, 2023
1 parent b35a191 commit 6069c0f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions flyte_tests_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,18 @@ def get_commands(output):
# Use the `pyflyte run` command to execute the workflow
output_string = str(subprocess.run(["pyflyte", "run", file_name], capture_output=True, text=True).stdout)

print(output_string)
print(workflow)
print(workflow in output_string)

# Check if the workflow specified is present in the pyflyte run output
if workflow in output_string:
print(output_string.split())
just_the_workflow = workflow.split(".")[2]
if just_the_workflow in output_string.split():
print("Workflow found in the pyflyte run output.")
else:
raise Exception("Workflow not found in the pyflyte run output.")

# Check if the specified parameters are valid
options_output = subprocess.run(
["pyflyte", "run", file_name, workflow.split(".")[2], "--help"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
["pyflyte", "run", file_name, just_the_workflow, "--help"],
capture_output=True,
text=True,
).stdout

Expand Down

0 comments on commit 6069c0f

Please sign in to comment.