Skip to content

Commit 2df4452

Browse files
committed
improve test running on mac-os
1 parent 3c3aee3 commit 2df4452

17 files changed

+32
-27
lines changed

cwltool/argparser.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import urllib
66
from typing import (
77
Any,
8-
AnyStr,
98
Callable,
109
Dict,
1110
List,
@@ -18,8 +17,6 @@
1817
cast,
1918
)
2019

21-
from schema_salad.ref_resolver import file_uri
22-
2320
from .loghandler import _logger
2421
from .process import Process, shortname
2522
from .resolver import ga4gh_tool_registries

cwltool/command_line_tool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from functools import cmp_to_key, partial
1616
from typing import (
1717
Any,
18-
Callable,
1918
Dict,
2019
Generator,
2120
List,

cwltool/cuda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import subprocess # nosec
22
import xml.dom.minidom # nosec
3-
from typing import Tuple, cast
3+
from typing import Tuple
44

55
from .loghandler import _logger
66
from .utils import CWLObjectType

cwltool/docker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
from .builder import Builder
1818
from .context import RuntimeContext
19-
from .cuda import cuda_check
2019
from .docker_id import docker_vm_id
2120
from .errors import WorkflowException
2221
from .job import ContainerCommandLineJob

cwltool/provenance_profile.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,7 @@
2020
)
2121

2222
from prov.identifier import Identifier, QualifiedName
23-
from prov.model import (
24-
PROV,
25-
PROV_LABEL,
26-
PROV_TYPE,
27-
PROV_VALUE,
28-
ProvDocument,
29-
ProvEntity,
30-
ProvRecord,
31-
)
23+
from prov.model import PROV, PROV_LABEL, PROV_TYPE, PROV_VALUE, ProvDocument, ProvEntity
3224
from schema_salad.sourceline import SourceLine
3325
from typing_extensions import TYPE_CHECKING
3426

tests/checker_wf/wc.cwl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env cwl-runner
22
cwlVersion: v1.1
33
class: CommandLineTool
4+
hints:
5+
DockerRequirement:
6+
dockerPull: docker.io/debian:stable-slim
47
inputs:
58
intxt:
69
type: File

tests/subgraph/count-lines17-wf.cwl.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
"-l"
114114
],
115115
"class": "CommandLineTool",
116+
"hints": {
117+
"DockerRequirement": {
118+
"dockerPull": "docker.io/debian:stable-slim"
119+
}
120+
},
116121
"id": "count-lines17-wf.cwl@step_step1@run@step_stepX@run@step_stepY@run",
117122
"inputs": [
118123
{

tests/subgraph/wc-tool.cwl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
class: CommandLineTool
44
cwlVersion: v1.0
55

6+
hints:
7+
DockerRequirement:
8+
dockerPull: docker.io/debian:stable-slim
9+
610
inputs:
711
file1: File
812

tests/test_cuda.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from cwltool.job import CommandLineJob
1212
from cwltool.load_tool import load_tool
1313
from cwltool.main import main
14-
from cwltool.pathmapper import MapperEnt, PathMapper
15-
from cwltool.process import use_custom_schema, use_standard_schema
14+
from cwltool.pathmapper import PathMapper
15+
from cwltool.process import use_custom_schema
1616
from cwltool.stdfsaccess import StdFsAccess
17-
from cwltool.update import INTERNAL_VERSION, ORIGINAL_CWLVERSION
17+
from cwltool.update import INTERNAL_VERSION
1818
from cwltool.utils import CWLObjectType
1919

2020
from .util import get_data, needs_docker, needs_singularity_3_or_newer

tests/test_examples.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ def test_static_checker() -> None:
910910
factory.make(get_data("tests/checker_wf/broken-wf3.cwl"))
911911

912912

913+
@needs_docker
913914
def test_circular_dependency_checker() -> None:
914915
# check that the circular dependency checker raises exception when there is
915916
# circular dependency in the workflow.
@@ -1449,6 +1450,7 @@ def test_no_compute_chcksum(tmp_path: Path, factor: str) -> None:
14491450
assert "checksum" not in stdout
14501451

14511452

1453+
@needs_docker
14521454
@pytest.mark.parametrize("factor", test_factors)
14531455
def test_bad_userspace_runtime(factor: str) -> None:
14541456
test_file = "tests/wf/wc-tool.cwl"

0 commit comments

Comments
 (0)