

def testBindDateArrayByVar(self):
    'test binding in a date array (with arrayvar)'
    returnValue = self.cursor.var(cx_Oracle.NUMBER)
    array = self.cursor.arrayvar(cx_Oracle.DATETIME, 10, 20)
    array.setvalue(0, [r[1] for r in self.rawData])
    self.cursor.execute('\n                begin\n                  :p_ReturnValue := pkg_TestDateArrays.TestInArrays(\n                      :p_StartValue, :p_BaseDate, :p_Array);\n                end;', p_ReturnValue=returnValue, p_StartValue=7, p_BaseDate=cx_Oracle.Date(2002, 12, 14), p_Array=array)
    self.failUnlessEqual(returnValue.getvalue(), 17.5)

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cx_Oracle-5.1.2/test/DateTimeVar.py TestDateTimeVar.testBindDateArrayByVar/original