'Light testing of Table.insert_row() method.  The deep testing is done via
the add_row() tests which calls insert_row(index=len(self), ...), so
here just test that the added index parameter is handled correctly.'

def test_insert_table_row(self, table_types):

    self._setup(table_types)
    row = (10, 40.0, 'x', [10, 20])
    for index in range((-3), 4):
        indices = np.insert(np.arange(3), index, 3)
        t = table_types.Table([self.a, self.b, self.c, self.d])
        t2 = t.copy()
        t.add_row(row)
        t2.insert_row(index, row)
        for name in t.colnames:
            if (t[name].dtype.kind == 'f'):
                assert np.allclose(t[name][indices], t2[name])
            else:
                assert np.all((t[name][indices] == t2[name]))
    for index in ((-4), 4):
        t = table_types.Table([self.a, self.b, self.c, self.d])
        with pytest.raises(IndexError):
            t.insert_row(index, row)
