Skip to content

Commit e20ad00

Browse files
authored
Merge pull request #105 from common-workflow-language/flexi-cwltest
Allow "Any" in tests for flexibility
2 parents 928f897 + b86f644 commit e20ad00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cwltool/cwltest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ class CompareFail(Exception):
2525

2626

2727
def compare(a, b): # type: (Any, Any) -> bool
28+
if a == "Any" or b == "Any":
29+
return True
2830
try:
2931
if isinstance(a, dict):
3032
if a.get("class") == "File":
33+
if a["path"] == "Any" or b["path"] == "Any":
34+
return True
3135
if not (b["path"].endswith("/" + a["path"]) or ("/" not in b["path"] and a["path"] == b["path"])):
3236
raise CompareFail(u"%s does not end with %s" %(b["path"], a["path"]))
3337
# ignore empty collections

0 commit comments

Comments
 (0)