'test binding in/out a string array (with arrayvar)'

def testBindInOutStringArrayByVar(self):

    array = self.cursor.arrayvar(cx_Oracle.STRING, 10, 100)
    originalData = [r[1] for r in self.rawData]
    expectedData = ([(u'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(u'\n                                                                begin\n                                                                        pkg_TestStringArrays.TestInOutArrays(:numElems,    :array);\n                                                                end;', numElems=5, array=array)
    self.failUnlessEqual(array.getvalue(), expectedData)
