

def __PerformTest(self, a_Type, a_InputType):
    self.cursor.execute(('truncate table Test%ss' % a_Type))
    if (a_InputType == cx_Oracle.LONG_STRING):
        longString = ''
    else:
        longString = ''
    for i in range(1, 11):
        if (a_InputType == cx_Oracle.LONG_STRING):
            char = unichr(((ord('A') + i) - 1))
        else:
            char = chr(((ord('A') + i) - 1))
        longString += (char * 25000)
        self.cursor.setinputsizes(p_LongString=a_InputType)
        self.cursor.execute(('\n                    insert into Test%ss (\n                      IntCol,\n                      %sCol\n                    ) values (\n                      :p_IntegerValue,\n                      :p_LongString\n                    )' % (a_Type, a_Type)), p_IntegerValue=i, p_LongString=longString)
    self.connection.commit()
    self.cursor.setoutputsize(250000, 2)
    self.cursor.execute(('\n                select *\n                from Test%ss\n                order by IntCol' % a_Type))
    longString = ''
    while 1:
        row = self.cursor.fetchone()
        if (row is None):
            break
        (integerValue, fetchedValue) = row
        char = unichr(((ord('A') + integerValue) - 1))
        longString += (char * 25000)
        self.failUnlessEqual(len(fetchedValue), (integerValue * 25000))
        self.failUnlessEqual(fetchedValue, longString)

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cx_Oracle-5.1.2/test/uLongVar.py TestLongVar.__PerformTest/original