Update of /cvsroot/jython/jython/Lib/test/zxjdbc
In directory usw-pr-cvs1:/tmp/cvs-serv25219/Lib/test/zxjdbc
Modified Files:
zxtest.py
Log Message:
changed rowid to lastrowid per the spec
Index: zxtest.py
===================================================================
RCS file: /cvsroot/jython/jython/Lib/test/zxjdbc/zxtest.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** zxtest.py 2001/12/29 07:16:55 1.4
--- zxtest.py 2001/12/29 18:00:14 1.5
***************
*** 364,367 ****
--- 364,369 ----
c.execute("insert into zxtesting values (?, ?, ?)", [(500, 'bz', 'or')])
assert c.updatecount == 1, "expected [1], got [%d]" % (c.updatecount)
+ c.execute("select * from zxtesting")
+ assert c.updatecount == -1, "expected updatecount to be -1 after query"
# there's a *feature* in the mysql engine where it returns 0 for delete if there is no
# where clause, regardless of the actual value. using a where clause forces it to calculate
***************
*** 561,565 ****
c = self.cursor()
! assert "expected initial rowid to be None", c.rowid == None
try:
--- 563,567 ----
c = self.cursor()
! assert c.lastrowid == None, "expected initial lastrowid to be None"
try:
***************
*** 569,579 ****
c.execute("insert into %s (b) values (?)" % (tabname), [(0,)])
! assert c.rowid is not None, "rowid is None"
try:
! for idx in range(c.rowid + 1, c.rowid + 25):
c.execute("insert into %s (b) values (?)" % (tabname), [(idx,)])
! assert c.rowid is not None, "rowid is None"
! assert c.rowid == idx, "expected rowid [%d], got [%d]" % (idx, c.rowid)
except:
self.db.rollback()
--- 571,581 ----
c.execute("insert into %s (b) values (?)" % (tabname), [(0,)])
! assert c.lastrowid is not None, "lastrowid is None"
try:
! for idx in range(c.lastrowid + 1, c.lastrowid + 25):
c.execute("insert into %s (b) values (?)" % (tabname), [(idx,)])
! assert c.lastrowid is not None, "lastrowid is None"
! self.assertEquals(idx, c.lastrowid)
except:
self.db.rollback()
|