From 713f6e214f3adb63edbe589aa2d6abf969d0e943 Mon Sep 17 00:00:00 2001 From: Tomoya Tanjo Date: Sun, 14 Jul 2024 05:49:17 +0000 Subject: [PATCH] Fix #216 by considering the case of `job` field with null value --- cwltest/plugin.py | 2 +- cwltest/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cwltest/plugin.py b/cwltest/plugin.py index baa4cae..57a8ab4 100644 --- a/cwltest/plugin.py +++ b/cwltest/plugin.py @@ -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: diff --git a/cwltest/utils.py b/cwltest/utils.py index d2fa57e..3a6a15b 100644 --- a/cwltest/utils.py +++ b/cwltest/utils.py @@ -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: