

def testBindInOutStringArrayByVar(self):
    'test binding in/out a string array (with arrayvar)'
    array = self.cursor.arrayvar(cx_Oracle.STRING, 10, 100)
    originalData = [r[1] for r in self.rawData]
    expectedData = ([('Converted element # %d originally had length %d' % (i, len(originalData[(i - 1)]))) for i in range(1, 6)] + originalData[5:])
    array.setvalue(0, originalData)
    self.cursor.execute('\n                begin\n                  pkg_TestStringArrays.TestInOutArrays(:p_NumElems, :p_Array);\n                end;', p_NumElems=5, p_Array=array)
    self.failUnlessEqual(array.getvalue(), originalData)

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cx_Oracle-5.1.2/test/StringVar.py TestStringVar.testBindInOutStringArrayByVar/VarMisuse@121/224 `expectedData`->`originalData`