From 79f1483a282b5a7d6f63667d578b6f48c26c6c8c Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 24 Oct 2008 13:56:33 +0000 Subject: [PATCH] Make the bind variables and fetch variables accessible although they need to be treated carefully since they are used internally; return the cursor from the execute() method as a convenience. --- test/uLongVar.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/uLongVar.py b/test/uLongVar.py index a0e3991..e66ee3d 100644 --- a/test/uLongVar.py +++ b/test/uLongVar.py @@ -67,19 +67,22 @@ class TestLongVar(BaseTestCase): def testSetOutputSizesAll(self): "test setoutputsizes is valid (all)" self.cursor.setoutputsize(25000) - longVar = self.cursor.execute(u"select * from TestLongRaws")[1] + self.cursor.execute(u"select * from TestLongRaws") + longVar = self.cursor.fetchvars[1] self.failUnlessEqual(longVar.maxlength, 25004) def testSetOutputSizesWrongColumn(self): "test setoutputsizes is valid (wrong column)" self.cursor.setoutputsize(25000, 1) - longVar = self.cursor.execute(u"select * from TestLongRaws")[1] + self.cursor.execute(u"select * from TestLongRaws") + longVar = self.cursor.fetchvars[1] self.failUnlessEqual(longVar.maxlength, 131072) def testSetOutputSizesRightColumn(self): "test setoutputsizes is valid (right column)" self.cursor.setoutputsize(35000, 2) - longVar = self.cursor.execute(u"select * from TestLongs")[1] + self.cursor.execute(u"select * from TestLongs") + longVar = self.cursor.fetchvars[1] self.failUnlessEqual(longVar.maxlength, 70008) def testArraySizeTooLarge(self):