def test_idlist(self):
        f = tvtk.IdList()
        a = numpy.array([0, 1, 2, 3])
        f.from_array(a)
        for i, j in zip(a, f):
            self.assertEqual(i, j)
        self.assertEqual(f[-1], 3)
        self.assertEqual(f[0], 0)
        if sys.version_info[0] > 2:
            self.assertEqual(repr(f), '[0, 1, 2, 3]')
        else:
            if type(f[0]) is long:
                self.assertEqual(repr(f), '[0L, 1L, 2L, 3L]')
            else:
                self.assertEqual(repr(f), '[0, 1, 2, 3]')
        f.append(4)
        f.extend([5, 6])
        self.assertEqual(len(f), 7)
        f[1] = -1
        self.assertEqual(f[1], -1)
        self.assertRaises(IndexError, f.__getitem__, 100)
        self.assertRaises(IndexError, f.__setitem__, 100, 100)
Return a log entry resource of the appropriate type.
dataset/ETHPy150Open enthought/mayavi/tvtk/tests/test_tvtk.py/TestTVTK.test_idlist--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/logging/logger.py/Logger._make_entry_resource