From: brian z. <bz...@us...> - 2002-01-08 05:39:35
|
Update of /cvsroot/jython/jython/Lib/test/zxjdbc In directory usw-pr-cvs1:/tmp/cvs-serv18246/Lib/test/zxjdbc Modified Files: zxtest.py Log Message: implemented iteration protocol Index: zxtest.py =================================================================== RCS file: /cvsroot/jython/jython/Lib/test/zxjdbc/zxtest.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** zxtest.py 2002/01/07 02:59:00 1.7 --- zxtest.py 2002/01/08 05:39:32 1.8 *************** *** 100,103 **** --- 100,118 ---- c.close() + def testIteration(self): + """testing the iteration protocol""" + c = self.cursor() + try: + c.execute("select * from zxtesting") + cnt = 0 + for a in c: + assert a is not None, "row is None" + self.assertEquals(3, len(a)) + cnt += 1 + self.assertEquals(7, cnt) + c.execute("select * from zxtesting") + finally: + c.close() + def testColumns(self): """testing cursor.columns()""" *************** *** 358,361 **** --- 373,377 ---- def testUpdateCount(self): + """testing update count functionality""" c = self.cursor() try: *************** *** 559,563 **** def testRowid(self): ! """test the autoincrement facilities of the different handlers""" assert self.has_table("autoincrementtable"), "no autoincrement table" --- 575,579 ---- def testRowid(self): ! """testing the autoincrement facilities of the different handlers""" assert self.has_table("autoincrementtable"), "no autoincrement table" |