Skip to content

Commit f9bf7ac

Browse files
committed
skipping bosh for windows
1 parent bd7b312 commit f9bf7ac

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

pydra/engine/tests/test_boutiques.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..task import ShellCommandTask
88
from ..submitter import Submitter
99
from ..boutiques import BoshTask
10-
from .utils import result_no_submitter, result_submitter
10+
from .utils import result_no_submitter, result_submitter, no_win
1111

1212
need_bosh_docker = pytest.mark.skipif(
1313
shutil.which("docker") is None
@@ -23,6 +23,7 @@
2323
Infile = Path(__file__).resolve().parent / "data_tests" / "test.nii.gz"
2424

2525

26+
@no_win
2627
@need_bosh_docker
2728
@pytest.mark.parametrize(
2829
"maskfile", ["test_brain.nii.gz", "test_brain", "test_brain.nii"]
@@ -46,6 +47,7 @@ def test_boutiques_1(maskfile, plugin, results_function):
4647
assert not res.output.out_outskin_off.exists()
4748

4849

50+
@no_win
4951
@need_bosh_docker
5052
@pytest.mark.parametrize(
5153
"maskfile", ["test_brain.nii.gz", "test_brain", "test_brain.nii"]
@@ -76,6 +78,7 @@ def test_boutiques_wf_1(maskfile, plugin):
7678
assert res.output.outfile.exists()
7779

7880

81+
@no_win
7982
@need_bosh_docker
8083
@pytest.mark.parametrize(
8184
"maskfile", ["test_brain.nii.gz", "test_brain", "test_brain.nii"]

pydra/engine/tests/test_dockertask.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
# -*- coding: utf-8 -*-
22

3-
import os, sys, shutil
4-
import subprocess as sp
3+
import os, shutil
54
import pytest
65
import attr
76

87
from ..task import DockerTask, ShellCommandTask
98
from ..submitter import Submitter
109
from ..core import Workflow
1110
from ..specs import ShellOutSpec, SpecInfo, File, DockerSpec
11+
from .utils import no_win, need_docker
1212

1313
if bool(shutil.which("sbatch")):
1414
Plugins = ["cf", "slurm"]
1515
else:
1616
Plugins = ["cf"]
1717

18-
need_docker = pytest.mark.skipif(
19-
shutil.which("docker") is None or sp.call(["docker", "info"]),
20-
reason="no docker within the container",
21-
)
22-
no_win = pytest.mark.skipif(
23-
sys.platform.startswith("win"),
24-
reason="docker command not adjusted for windows docker",
25-
)
26-
2718

2819
@no_win
2920
@need_docker

pydra/engine/tests/utils.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
# Tasks for testing
22
import time
3+
import sys, shutil
34
import typing as tp
45
from pathlib import Path
6+
import subprocess as sp
7+
import pytest
58

69
from ..core import Workflow
710
from ..submitter import Submitter
811
from ... import mark
912
from ..specs import File
1013

1114

15+
need_docker = pytest.mark.skipif(
16+
shutil.which("docker") is None or sp.call(["docker", "info"]),
17+
reason="no docker within the container",
18+
)
19+
no_win = pytest.mark.skipif(
20+
sys.platform.startswith("win"),
21+
reason="docker command not adjusted for windows docker",
22+
)
23+
24+
1225
def result_no_submitter(shell_task, plugin=None):
1326
""" helper function to return result when running without submitter """
1427
return shell_task()

0 commit comments

Comments
 (0)