def test_tvtk_dataset_name(self):
        datasets = [tvtk.ImageData(),
                    tvtk.StructuredPoints(),
                    tvtk.RectilinearGrid(),
                    tvtk.StructuredGrid(),
                    tvtk.PolyData(),
                    tvtk.UnstructuredGrid(),
                    tvtk.Property(), # Not a dataset!
                    'foo', # Not a TVTK object.
                    ]
        expect = ['image_data',
                  'image_data',
                  'rectilinear_grid',
                  'structured_grid',
                  'poly_data',
                  'unstructured_grid',
                  'none',
                  'none'
                  ]
        result = [pipeline_info.get_tvtk_dataset_name(d) for d in datasets]
        self.assertEqual(result, expect)
Can tvtk datasets can be converted to names correctly.
dataset/ETHPy150Open enthought/mayavi/mayavi/tests/test_pipeline_info.py/TestPipelineInfoTest.test_tvtk_dataset_name