Skip to content

Commit 5ff027f

Browse files
committed
skip some tests on appveyor
1 parent 65aec2a commit 5ff027f

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

tests/test_examples.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
from cwltool.main import main
3131
from cwltool.utils import onWindows
3232

33-
from .util import get_data, needs_docker, get_windows_safe_factory
33+
from .util import (get_data, needs_docker, get_windows_safe_factory,
34+
windows_needs_docker)
3435

3536
sys.argv = ['']
3637

@@ -137,6 +138,7 @@ def test_params(self):
137138

138139
class TestFactory(unittest.TestCase):
139140

141+
@windows_needs_docker
140142
def test_factory(self):
141143
f = get_windows_safe_factory()
142144
echo = f.make(get_data("tests/echo.cwl"))

tests/test_iwdr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
import cwltool
44
import cwltool.factory
5-
from .util import get_data, get_windows_safe_factory
5+
from .util import get_data, get_windows_safe_factory, windows_needs_docker
66

77

88
class TestInitialWorkDir(unittest.TestCase):
99

10+
@windows_needs_docker
1011
def test_newline_in_entry(self):
1112
"""
1213
test that files in InitialWorkingDirectory are created with a newline character

tests/test_js_sandbox.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
exec_js_process)
1414
import cwltool.sandboxjs
1515
from cwltool.utils import onWindows
16-
from .util import get_data, get_windows_safe_factory
16+
from .util import get_data, get_windows_safe_factory, windows_needs_docker
1717
import pytest
1818

1919

@@ -47,6 +47,7 @@ def test_is_javascript_installed(self):
4747

4848
class TestValueFrom(unittest.TestCase):
4949

50+
@windows_needs_docker
5051
def test_value_from_two_concatenated_expressions(self):
5152
f = get_windows_safe_factory()
5253
echo = f.make(get_data("tests/wf/vf-concat.cwl"))

tests/test_parallel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
import cwltool.factory
88
from cwltool.executors import MultithreadedJobExecutor
99
from cwltool.utils import onWindows
10-
from .util import get_data, get_windows_safe_factory
10+
from .util import get_data, get_windows_safe_factory, windows_needs_docker
1111

1212

1313
class TestParallel(unittest.TestCase):
14-
@pytest.mark.skipif(onWindows(),
15-
reason="Unexplainable behavior: cwltool on AppVeyor does not recognize cwlVersion"
16-
"in count-lines1-wf.cwl")
14+
@windows_needs_docker
1715
def test_sequential_workflow(self):
1816
test_file = "tests/wf/count-lines1-wf.cwl"
1917
f = cwltool.factory.Factory(executor=MultithreadedJobExecutor())
@@ -24,6 +22,7 @@ def test_sequential_workflow(self):
2422
}),
2523
{"count_output": 16})
2624

25+
@windows_needs_docker
2726
def test_scattered_workflow(self):
2827
test_file = "tests/wf/scatter-wf4.cwl"
2928
job_file = "tests/wf/scatter-job2.json"

tests/util.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@ def get_data(filename):
4343
needs_docker = pytest.mark.skipif(not bool(distutils.spawn.find_executable('docker')),
4444
reason="Requires the docker executable on the "
4545
"system path.")
46+
47+
windows_needs_docker = pytest.mark.skipif(
48+
onWindows() and not bool(distutils.spawn.find_executable('docker')),
49+
reason="Running this test on MS Windows requires the docker executable "
50+
"on the system path.")

0 commit comments

Comments
 (0)