Skip to content

Commit 900364a

Browse files
author
Anton Khodak
authored
Merge pull request #45 from common-workflow-language/location_and_path_not_required
expected output doesn't have to include location&path
2 parents 9db8c1d + 44e1382 commit 900364a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cwltest/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def run_test(args, i, tests): # type: (argparse.Namespace, int, List[Dict[str,
159159

160160

161161
def main(): # type: () -> int
162-
_logger.handlers.pop() # prints log messages twice without this line
163162

164163
parser = argparse.ArgumentParser(description='Compliance tests for cwltool')
165164
parser.add_argument("--test", type=str, help="YAML file describing test cases", required=True)

cwltest/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ def compare_location(expected, actual):
2323
comp = "path"
2424
if "path" not in actual:
2525
actual["path"] = actual["location"]
26-
else:
26+
elif "location" in expected:
2727
comp = "location"
28+
else:
29+
return
2830
if expected[comp] != "Any" and (not (actual[comp].endswith("/" + expected[comp]) or
2931
("/" not in actual[comp] and expected[comp] == actual[comp]))):
3032
raise CompareFail.format(expected, actual, u"%s does not end with %s" % (actual[comp], expected[comp]))
@@ -44,7 +46,7 @@ def check_keys(keys, expected, actual):
4446
def compare_file(expected, actual):
4547
# type: (Dict[str,Any], Dict[str,Any]) -> None
4648
compare_location(expected, actual)
47-
other_keys = set(expected.keys()) - {'path', 'location'}
49+
other_keys = set(expected.keys()) - {'path', 'location', 'listing'}
4850
check_keys(other_keys, expected, actual)
4951

5052

0 commit comments

Comments
 (0)