Commit ca6ca7fb authored by Ken Martin's avatar Ken Martin

Cleanup a python test and some cmake code

Just some minor cleanups for no rendering backend
parent 3221bed9
......@@ -50,11 +50,11 @@ foreach(backend ${VTK_BACKENDS})
endforeach()
# check for None with rendering turned on
if("None" STREQUAL ${VTK_RENDERING_BACKEND} AND ${VTK_Group_Rendering})
if(VTK_RENDERING_BACKEND STREQUAL "None" AND VTK_Group_Rendering)
message(FATAL_ERROR "VTK_Group_Rendering is on when the rendering backend is set to None. Please either turn off the rendering group or set the rendering backend to a different value")
endif()
if (${VTK_RENDERING_BACKEND} STREQUAL "None")
if (VTK_RENDERING_BACKEND STREQUAL "None")
# with no backend make a dummy None modules
vtk_module(vtkRenderingNone )
vtk_module(vtkRenderingContextNone )
......
......@@ -24,12 +24,15 @@ class TestOverloads(Testing.vtkTest):
self.assertEqual(t.GetMatrix().GetElement(0, 0), 2)
t.SetMatrix([0,1,0,0, 1,0,0,0, 0,0,-1,0, 0,0,0,1])
self.assertEqual(t.GetMatrix().GetElement(0, 0), 0)
# mixed number of arguments
w = vtk.vtkRenderWindow()
w.SetTileScale(2)
self.assertEqual(w.GetTileScale(), (2,2))
w.SetTileScale(3,4)
self.assertEqual(w.GetTileScale(), (3,4))
try:
w = vtk.vtkRenderWindow()
except:
print('Info: No concrete rendering backend')
else:
w.SetTileScale(2)
self.assertEqual(w.GetTileScale(), (2,2))
w.SetTileScale(3,4)
self.assertEqual(w.GetTileScale(), (3,4))
def testConstructors(self):
"""Test overloaded constructors"""
......
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