Skip to content

Commit a9c039e

Browse files
committed
fixed mesh tests
1 parent b68c66a commit a9c039e

File tree

4 files changed

+7
-85
lines changed

4 files changed

+7
-85
lines changed

nipype/algorithms/mesh.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
del os.environ['ETS_TOOLKIT']
4545

4646

47+
def no_tvtk():
48+
global have_tvtk
49+
return not have_tvtk
50+
51+
4752
class TVTKBaseInterface(BaseInterface):
4853

4954
""" A base class for interfaces using VTK """

nipype/algorithms/tests/test_auto_ErrorMap.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_Overlap.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

nipype/algorithms/tests/test_mesh_ops.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import numpy as np
1313

1414
from nipype.algorithms import mesh as m
15-
from nipype.algorithms.mesh import have_vtk
1615

1716
import platform
1817

@@ -22,7 +21,7 @@ def test_ident_distances():
2221
curdir = os.getcwd()
2322
os.chdir(tempdir)
2423

25-
if not have_vtk:
24+
if m.no_tvtk():
2625
yield assert_raises, ImportError, m.ComputeMeshWarp
2726
else:
2827
in_surf = example_data('surf01.vtk')
@@ -46,7 +45,7 @@ def test_trans_distances():
4645
curdir = os.getcwd()
4746
os.chdir(tempdir)
4847

49-
if not have_vtk:
48+
if m.no_tvtk():
5049
yield assert_raises, ImportError, m.ComputeMeshWarp
5150
else:
5251
from nipype.algorithms.mesh import tvtk

0 commit comments

Comments
 (0)