From 6b1872639f196859dd6710f526ce21850ac701ab Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 30 Sep 2025 14:56:50 +0200 Subject: [PATCH] tests: defer import of cwltool, so we can skip thoses tests to avoid a circular dependency if needed. --- tests/test_graph_split.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_graph_split.py b/tests/test_graph_split.py index 5b716611..bcf96070 100644 --- a/tests/test_graph_split.py +++ b/tests/test_graph_split.py @@ -6,7 +6,6 @@ import pytest import requests -from cwltool.tests.util import get_main_output from cwl_utils.graph_split import graph_split @@ -28,6 +27,8 @@ def test_graph_split(tmp_path: Path) -> None: def test_graph_split_offline(tmp_path: Path) -> None: """Confirm that a local provided example produces no exception.""" + from cwltool.tests.util import get_main_output + with get_path("testdata/js-expr-req-wf.cwl").open() as handle: graph_split(handle, tmp_path, "yaml", "main.cwl", True) target = tmp_path / "wf.cwl" @@ -42,6 +43,8 @@ def test_graph_split_offline(tmp_path: Path) -> None: def test_graph_split_json_offline(tmp_path: Path) -> None: """Confirm that a local provided example produces no exception in JSON mode.""" + from cwltool.tests.util import get_main_output + target = tmp_path / "subdir" / "wf.cwl" with get_path("testdata/js-expr-req-wf.cwl").open() as handle: graph_split(handle, target.parent, "json", "main.cwl", True)