Commit 364faf7e authored by Ben Boeckel's avatar Ben Boeckel
Browse files

tests: indicate that tests were skipped if requirements are not met

parent cb8d2175
......@@ -5,7 +5,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.")
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
......
......@@ -5,7 +5,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.")
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
......
......@@ -5,7 +5,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.")
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
import vtk.numpy_interface.dataset_adapter as dsa
......
......@@ -16,7 +16,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.")
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
from vtk.util.numpy_support import numpy_to_vtk, vtk_to_numpy
import vtk.numpy_interface.dataset_adapter as dsa
......
......@@ -5,7 +5,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.")
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
import vtk.numpy_interface.dataset_adapter as dsa
......
......@@ -18,7 +18,8 @@ try:
except ImportError:
print("No weakref in this version of Python. Time to upgrade?")
print("Python version:", sys.version)
sys.exit(0)
from vtk.test import Testing
Testing.skip()
class TestWeakref(Testing.vtkTest):
......
......@@ -17,7 +17,8 @@ try:
import numpy.core.numeric as numeric
except ImportError:
print("WARNING: This test requires Numeric Python: http://numpy.sf.net")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import os
import glob
......
......@@ -7,7 +7,8 @@ try:
import numpy as np
except ImportError:
print("WARNING: This test requires Numeric Python: http://numpy.sf.net")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
def GenerateCell(cellType, points):
cell = vtk.vtkUnstructuredGrid()
......
......@@ -9,7 +9,8 @@ try:
import numpy
except ImportError:
print("WARNING: This test requires NumPy: http://http://www.numpy.org/")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
......
......@@ -4,7 +4,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.")
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
import vtk.test.Testing
......
......@@ -9,7 +9,8 @@ try:
except ImportError:
print("Numpy (http://numpy.scipy.org) not found.", end=' ')
print("This test requires numpy!")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
import vtk
import vtk.numpy_interface.dataset_adapter as dsa
......
......@@ -92,7 +92,8 @@ culler.SetSortingStyleToBackToFront()
valid = volumeMapper_0_0.IsRenderSupported(volumeProperty, ren1)
if (valid == 0):
print("Required Extensions Not Supported")
sys.exit(0)
from vtk.test import Testing
Testing.skip()
ren1.ResetCamera()
ren1.GetActiveCamera().Zoom(3.0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment