Updates will be applied - 3:30pm EDT (UTC -400). No downtime expected.

Commit d59a9781 authored by Ken Martin's avatar Ken Martin

Updated to have better python test code

updated the overload test to not rely on render window
parent ca6ca7fb
......@@ -24,15 +24,20 @@ 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)
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))
# mixed number of arguments
fd = vtk.vtkFieldData()
fa = vtk.vtkFloatArray()
fa.SetName("Real")
ia = vtk.vtkIntArray()
ia.SetName("Integer")
fd.AddArray(fa)
fd.AddArray(ia)
a = fd.GetArray("Real")
self.assertIs(a, fa)
i = vtk.mutable(0)
a = fd.GetArray("Integer", i)
self.assertIs(a, ia)
self.assertEqual(i, 1)
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