[pypy-svn] r69349 - in pypy/trunk/pypy/module/oracle: . test
afa at codespeak.net
afa at codespeak.net
Tue Nov 17 15:06:29 CET 2009
Author: afa
Date: Tue Nov 17 15:06:28 2009
New Revision: 69349
Modified:
pypy/trunk/pypy/module/oracle/interp_cursor.py
pypy/trunk/pypy/module/oracle/test/test_select.py
Log:
Add cursor.rowcount
Modified: pypy/trunk/pypy/module/oracle/interp_cursor.py
==============================================================================
--- pypy/trunk/pypy/module/oracle/interp_cursor.py (original)
+++ pypy/trunk/pypy/module/oracle/interp_cursor.py Tue Nov 17 15:06:28 2009
@@ -1,8 +1,8 @@
from pypy.interpreter.baseobjspace import Wrappable
from pypy.interpreter.gateway import ObjSpace, W_Root, NoneNotWrapped
from pypy.interpreter.argument import Arguments
-from pypy.interpreter.typedef import TypeDef, interp_attrproperty_w
-from pypy.interpreter.typedef import GetSetProperty
+from pypy.interpreter.typedef import TypeDef, GetSetProperty
+from pypy.interpreter.typedef import interp_attrproperty
from pypy.interpreter.gateway import interp2app
from pypy.interpreter.error import OperationError
from pypy.rpython.lltypesystem import rffi, lltype
@@ -779,4 +779,5 @@
next = interp2app(W_Cursor.descr_next),
arraysize = GetSetProperty(cursor_arraysize_get, cursor_arraysize_set),
+ rowcount = interp_attrproperty('rowCount', W_Cursor),
)
Modified: pypy/trunk/pypy/module/oracle/test/test_select.py
==============================================================================
--- pypy/trunk/pypy/module/oracle/test/test_select.py (original)
+++ pypy/trunk/pypy/module/oracle/test/test_select.py Tue Nov 17 15:06:28 2009
@@ -26,6 +26,7 @@
cur.execute("select level-1 from dual connect by level-1<42")
rows = cur.fetchall()
assert rows == zip(range(42))
+ assert cur.rowcount == 42
def test_iterator(self):
cur = self.cnx.cursor()
More information about the Pypy-commit
mailing list