Commit 62d538b5 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

BUG: Fixed python vtkTuple templated class test.

The vtkTuple derived classes do not initialize members unless a
constructor with an initialization argument is called. Corrected the
tests to call such a constructor.

Change-Id: I723db01184859969cbf1f7b0da62248b4633ec12
parent 93862d03
......@@ -109,11 +109,11 @@ class TestTemplates(Testing.vtkTest):
# make sure Rect inherits operators
r = vtk.vtkRectf(0, 0, 2, 2)
self.assertEqual(r[2], 2.0)
c = vtk.vtkColor4ub()
c = vtk.vtkColor4ub(0, 0, 0)
self.assertEqual(list(c), [0, 0, 0, 255])
e = vtk.vtkVector['float32', 3]([0.0, 1.0, 2.0])
self.assertEqual(list(e), [0.0, 1.0, 2.0])
i = vtk.vtkVector3['i']()
i = vtk.vtkVector3['i'](0)
self.assertEqual(list(i), [0, 0, 0])
if __name__ == "__main__":
......
Supports Markdown
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