this test relies upon a cursor that can do fetchall()
after connection.rollback() was called.
Change-Id: I8c19a67bad97019375671c69d6ed7fa4f4e6872f
def setup_mappers(cls):
cls._setup_stock_mapping()
- @testing.combinations(("close",), ("expunge_all",))
+ @testing.combinations(
+ ("close", testing.requires.cursor_works_post_rollback),
+ ("expunge_all",),
+ )
def test_unbuffered_result_session_is_closed(self, meth):
"""test #7128"""
User = self.classes.User
return skip_if(["mssql", "mysql", "mariadb"], "no driver support")
+ @property
+ def cursor_works_post_rollback(self):
+ """Driver quirk where the cursor.fetchall() will work even if
+ the connection has been rolled back.
+
+ This generally refers to buffered cursors but also seems to work
+ with cx_oracle, for example.
+
+ """
+
+ return skip_if(["+pyodbc"], "no driver support")
+
@property
def independent_connections(self):
"""