~ubuntu-branches/debian/sid/mayavi2/sid

« back to all changes in this revision

Viewing changes to enthought/tvtk/tests/test_array_handler.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2009-03-27 04:34:55 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090327043455-vs6ox32daj6ndw33
Tags: 3.2.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
        del varr
398
398
        self.assertEqual(len(cache), 0)
399
399
 
 
400
    def test_id_array(self):
 
401
        """Test if a vtkIdTypeArray is converted correctly."""
 
402
        arr = vtk.vtkIdTypeArray()
 
403
        arr.SetNumberOfTuples(10)
 
404
        for i in range(10):
 
405
            arr.SetValue(i, i)
 
406
 
 
407
        np = array_handler.vtk2array(arr)
 
408
        self.assertEqual(numpy.all(np == range(10)), True)
 
409
 
400
410
 
401
411
if __name__ == "__main__":
402
412
    unittest.main()