File: 0001-tests-defer-import-of-cwltool-so-we-can-skip-thoses-.patch

package info (click to toggle)
cwl-utils 0.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,164 kB
  • sloc: python: 88,875; makefile: 141; javascript: 91
file content (40 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From: "Michael R. Crusoe" <michael.crusoe@gmail.com>
Date: Tue, 30 Sep 2025 14:56:50 +0200
Subject: tests: defer import of cwltool,
 so we can skip thoses tests to avoid a circular dependency if needed.

Forwarded: https://github.com/common-workflow-language/cwl-utils/pull/377
---
 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 5b71661..bcf9607 100644
--- a/tests/test_graph_split.py
+++ b/tests/test_graph_split.py
@@ -6,7 +6,6 @@ from pathlib import Path
 
 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)