Skip to content

Commit

Permalink
Fix #216 by considering the case of job field with null value
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-tan authored and mr-c committed Jul 14, 2024
1 parent 7208701 commit 713f6e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cwltest/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _run_test_hook_or_plain(
start_time = time.time()
reltool = os.path.relpath(test["tool"], start=config.test_basedir)
tooluri = urljoin(config.test_baseuri, reltool)
if "job" in test:
if test.get("job", None):
reljob = os.path.relpath(test["job"], start=config.test_basedir)
joburi = urljoin(config.test_baseuri, reljob)
else:
Expand Down
2 changes: 1 addition & 1 deletion cwltest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def run_test_plain(

reltool = os.path.relpath(test["tool"], start=config.test_basedir)
tooluri = urljoin(config.test_baseuri, reltool)
if "job" in test:
if test.get("job", None):
reljob = os.path.relpath(test["job"], start=config.test_basedir)
joburi = urljoin(config.test_baseuri, reljob)
else:
Expand Down

0 comments on commit 713f6e2

Please sign in to comment.