Test vector templates
(self)
| 129 | self.assertEqual(o.__class__, vtkDenseArray[float]) |
| 130 | |
| 131 | def testVector(self): |
| 132 | """Test vector templates""" |
| 133 | # make sure Rect inherits operators |
| 134 | r = vtkRectf(0, 0, 2, 2) |
| 135 | self.assertEqual(r[2], 2.0) |
| 136 | c = vtkColor4ub(0, 0, 0) |
| 137 | self.assertEqual(list(c), [0, 0, 0, 255]) |
| 138 | e = vtkVector['float32', 3]([0.0, 1.0, 2.0]) |
| 139 | self.assertEqual(list(e), [0.0, 1.0, 2.0]) |
| 140 | i = vtkVector3['i'](0) |
| 141 | self.assertEqual(list(i), [0, 0, 0]) |
| 142 | |
| 143 | if __name__ == "__main__": |
| 144 | Testing.main([(TestTemplates, 'test')]) |
nothing calls this directly
no test coverage detected