Skip to content

Commit e5c9176

Browse files
committed
basic test
1 parent 6909002 commit e5c9176

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/test_provenance.py

+22
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,28 @@ def test_revsort_workflow(tmp_path: Path) -> None:
8181
check_provenance(folder)
8282

8383

84+
@needs_docker
85+
def test_revsort_label_annotations(tmp_path: Path) -> None:
86+
"""Affirm that EDAM file formats in the input object make it into CWLProv."""
87+
base_path = cwltool(
88+
tmp_path,
89+
get_data("tests/wf/revsort.cwl"),
90+
get_data("tests/wf/revsort-job.json"),
91+
)
92+
prov_file = base_path / "metadata" / "provenance" / "primary.cwlprov.nt"
93+
arcp_root = find_arcp(base_path)
94+
g = Graph()
95+
with open(prov_file, "rb") as f:
96+
g.parse(file=f, format="nt", publicID=arcp_root)
97+
mime_having_objects = list(g.subjects(SCHEMA.encodingFormat))
98+
assert len(mime_having_objects) == 2
99+
for obj in mime_having_objects:
100+
assert (
101+
next(g.objects(obj, SCHEMA.encodingFormat)).value
102+
== "https://www.iana.org/assignments/media-types/text/plain"
103+
)
104+
105+
84106
@needs_docker
85107
def test_nested_workflow(tmp_path: Path) -> None:
86108
check_provenance(cwltool(tmp_path, get_data("tests/wf/nested.cwl")), nested=True)

0 commit comments

Comments
 (0)