Skip to content

Commit 79c22ee

Browse files
committed
final fixes
1 parent 98f5c31 commit 79c22ee

File tree

12 files changed

+11
-53
lines changed

12 files changed

+11
-53
lines changed

nipype/interfaces/base/support.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class Bunch(object):
4949
>>> inputs
5050
Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=False)
5151
52-
5352
Notes
5453
-----
5554
The Bunch pattern came from the Python Cookbook:

nipype/interfaces/niftyfit/tests/test_asl.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44

55
import pytest
66

7-
from ....utils.filemanip import which
87
from ....testing import example_data
98
from ...niftyreg import get_custom_path
109

1110
from ..asl import FitAsl
12-
13-
14-
def no_nifty_tool(cmd=None):
15-
return which(cmd) is None
11+
from ...niftyreg.tests.test_regutils import no_nifty_tool
1612

1713

1814
@pytest.mark.skipif(no_nifty_tool(cmd='fit_asl'),

nipype/interfaces/niftyfit/tests/test_dwi.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
98

109
from ..dwi import FitDwi, DwiTool
11-
12-
13-
def no_nifty_tool(cmd=None):
14-
return which(cmd) is None
10+
from ...niftyreg.tests.test_regutils import no_nifty_tool
1511

1612

1713
@pytest.mark.skipif(no_nifty_tool(cmd='fit_dwi'),

nipype/interfaces/niftyfit/tests/test_qt1.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,12 @@
44

55
import pytest
66

7-
from ....utils.filemanip import which
87
from ....testing import example_data
98
from ...niftyreg import get_custom_path
10-
9+
from ...niftyreg.tests.test_regutils import no_nifty_tool
1110
from ..qt1 import FitQt1
1211

1312

14-
def no_nifty_tool(cmd=None):
15-
return which(cmd) is None
16-
17-
1813
@pytest.mark.skipif(no_nifty_tool(cmd='fit_qt1'),
1914
reason="niftyfit is not installed")
2015
def test_fit_qt1():

nipype/interfaces/niftyreg/tests/test_reg.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44

55
import pytest
66

7-
from ....utils.filemanip import which
87
from ....testing import example_data
98
from .. import (get_custom_path, RegAladin, RegF3D)
10-
11-
12-
def no_nifty_tool(cmd=None):
13-
return which(cmd) is None
9+
from .test_regutils import no_nifty_tool
1410

1511

1612
@pytest.mark.skipif(

nipype/interfaces/niftyseg/tests/test_em_interfaces.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
8+
from ...niftyreg.tests.test_regutils import no_nifty_tool
99
from .. import EM
1010

1111

12-
def no_nifty_tool(cmd=None):
13-
return which(cmd) is None
14-
15-
1612
@pytest.mark.skipif(no_nifty_tool(cmd='seg_EM'),
1713
reason="niftyseg is not installed")
1814
def test_seg_em():

nipype/interfaces/niftyseg/tests/test_label_fusion.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
8+
from ...niftyreg.tests.test_regutils import no_nifty_tool
99
from .. import LabelFusion, CalcTopNCC
1010

1111

12-
def no_nifty_tool(cmd=None):
13-
return which(cmd) is None
14-
15-
1612
@pytest.mark.skipif(no_nifty_tool(cmd='seg_LabFusion'),
1713
reason="niftyseg is not installed")
1814
def test_seg_lab_fusion():

nipype/interfaces/niftyseg/tests/test_lesions.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
8+
from ...niftyreg.tests.test_regutils import no_nifty_tool
99
from .. import FillLesions
1010

1111

12-
def no_nifty_tool(cmd=None):
13-
return which(cmd) is None
14-
15-
1612
@pytest.mark.skipif(no_nifty_tool(cmd='seg_FillLesions'),
1713
reason="niftyseg is not installed")
1814
def test_seg_filllesions():

nipype/interfaces/niftyseg/tests/test_maths.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
8+
from ...niftyreg.tests.test_regutils import no_nifty_tool
99
from .. import (UnaryMaths, BinaryMaths,
1010
BinaryMathsInteger, TupleMaths,
1111
Merge)
1212

1313

14-
def no_nifty_tool(cmd=None):
15-
return which(cmd) is None
16-
17-
1814
@pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'),
1915
reason="niftyseg is not installed")
2016
def test_unary_maths():

nipype/interfaces/niftyseg/tests/test_patchmatch.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
8+
from ...niftyreg.tests.test_regutils import no_nifty_tool
99
from .. import PatchMatch
1010

1111

12-
def no_nifty_tool(cmd=None):
13-
return which(cmd) is None
14-
15-
1612
@pytest.mark.skipif(no_nifty_tool(cmd='seg_PatchMatch'),
1713
reason="niftyseg is not installed")
1814
def test_seg_patchmatch():

nipype/interfaces/niftyseg/tests/test_stats.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
import pytest
55

6-
from ....utils.filemanip import which
76
from ....testing import example_data
87
from ...niftyreg import get_custom_path
8+
from ...niftyreg.tests.test_regutils import no_nifty_tool
99
from .. import UnaryStats, BinaryStats
1010

1111

12-
def no_nifty_tool(cmd=None):
13-
return which(cmd) is None
14-
15-
1612
@pytest.mark.skipif(no_nifty_tool(cmd='seg_stats'),
1713
reason="niftyseg is not installed")
1814
def test_unary_stats():

nipype/utils/filemanip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def which(cmd, env=None, pathext=None):
684684
"""
685685

686686
if pathext is None:
687-
pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
687+
pathext = os.getenv('PATHEXT', '').split(os.pathsep)
688688
pathext.insert(0, '')
689689

690690
path = os.getenv("PATH", os.defpath)

0 commit comments

Comments
 (0)