'test fetching a cursor'

def testFetchCursor(self):

    self.cursor.execute(u'\n                                                                select\n                                                                        IntCol,\n                                                                        cursor(select    IntCol    +    1    from    dual)    CursorValue\n                                                                from    TestNumbers\n                                                                order    by    IntCol')
    size = struct.calcsize('P')
    self.failUnlessEqual(self.cursor.description, [(u'INTCOL', cx_Oracle.NUMBER, 10, 22, 9, 0, 0), (u'CURSORVALUE', cx_Oracle.CURSOR, (-1), size, 0, 0, 1)])
    for i in range(1, 11):
        (number, cursor) = self.cursor.fetchone()
        self.failUnlessEqual(number, i)
        self.failUnlessEqual(cursor.fetchall(), [((i + 1),)])
