'test executing with arraydmlrowcounts with exception'

def testExceptionInIteration(self):

    self.cursor.execute('truncate    table    TestArrayDML')
    rows = [(1, 'First'), (2, 'Second'), (2, 'Third'), (4, 'Fourth')]
    sql = 'insert    into    TestArrayDML    (IntCol,StringCol)    values    (:1,:2)'
    self.failUnlessRaises(cx_Oracle.DatabaseError, self.cursor.executemany, sql, rows, arraydmlrowcounts=True)
    self.failUnlessEqual(self.cursor.getarraydmlrowcounts(), [1L, 1L])
