-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15439 from bernt-matthias/fix-looks-like-yaml-w-c…
…lass [22.05] fix looks_like_yaml_or_cwl_with_class
- Loading branch information
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import tempfile | ||
|
||
from galaxy.tool_util.loader_directory import is_a_yaml_with_class | ||
|
||
|
||
def test_is_a_yaml_with_class(): | ||
with tempfile.NamedTemporaryFile("w", suffix=".yaml") as tf: | ||
fname = tf.name | ||
tf.write( | ||
"""class: GalaxyWorkflow | ||
name: "Test Workflow" | ||
inputs: | ||
- id: input1 | ||
outputs: | ||
- id: wf_output_1 | ||
outputSource: first_cat/out_file1 | ||
steps: | ||
- tool_id: cat | ||
label: first_cat | ||
in: | ||
input1: input1""" | ||
) | ||
tf.flush() | ||
assert is_a_yaml_with_class(fname, ["GalaxyWorkflow"]) |