summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/engine/cursor.py4
-rw-r--r--lib/sqlalchemy/testing/suite/test_update_delete.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/cursor.py b/lib/sqlalchemy/engine/cursor.py
index b5b92b171..5a3b92901 100644
--- a/lib/sqlalchemy/engine/cursor.py
+++ b/lib/sqlalchemy/engine/cursor.py
@@ -1624,7 +1624,7 @@ class BaseCursorResult(object):
try:
return self.context.rowcount
except BaseException as e:
- self.cursor_strategy.handle_exception(self, e)
+ self.cursor_strategy.handle_exception(self, self.cursor, e)
@property
def lastrowid(self):
@@ -1645,7 +1645,7 @@ class BaseCursorResult(object):
try:
return self.context.get_lastrowid()
except BaseException as e:
- self.cursor_strategy.handle_exception(self, e)
+ self.cursor_strategy.handle_exception(self, self.cursor, e)
@property
def returns_rows(self):
diff --git a/lib/sqlalchemy/testing/suite/test_update_delete.py b/lib/sqlalchemy/testing/suite/test_update_delete.py
index 3fb51ead3..f5ee2e028 100644
--- a/lib/sqlalchemy/testing/suite/test_update_delete.py
+++ b/lib/sqlalchemy/testing/suite/test_update_delete.py
@@ -37,6 +37,7 @@ class SimpleUpdateDeleteTest(fixtures.TablesTest):
)
assert not r.is_insert
assert not r.returns_rows
+ assert r.rowcount == 1
eq_(
connection.execute(t.select().order_by(t.c.id)).fetchall(),
@@ -48,6 +49,7 @@ class SimpleUpdateDeleteTest(fixtures.TablesTest):
r = connection.execute(t.delete().where(t.c.id == 2))
assert not r.is_insert
assert not r.returns_rows
+ assert r.rowcount == 1
eq_(
connection.execute(t.select().order_by(t.c.id)).fetchall(),
[(1, "d1"), (3, "d3")],