From: Scott Dugas Date: Wed, 22 Oct 2014 19:09:05 +0000 (-0400) Subject: Support additional args/kwargs on cursor method X-Git-Tag: rel_1_0_0~19^2~3^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25434e9209af9ee2c05b651bc4fe197541c0bd60;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Support additional args/kwargs on cursor method fdbsql has an optional nested kwarg, which is supported in the actual code, but not in the testing proxy --- diff --git a/lib/sqlalchemy/testing/engines.py b/lib/sqlalchemy/testing/engines.py index 67c13231e9..75bcc58e11 100644 --- a/lib/sqlalchemy/testing/engines.py +++ b/lib/sqlalchemy/testing/engines.py @@ -284,10 +284,10 @@ class DBAPIProxyCursor(object): """ - def __init__(self, engine, conn): + def __init__(self, engine, conn, *args, **kwargs): self.engine = engine self.connection = conn - self.cursor = conn.cursor() + self.cursor = conn.cursor(*args, **kwargs) def execute(self, stmt, parameters=None, **kw): if parameters: @@ -315,8 +315,10 @@ class DBAPIProxyConnection(object): self.engine = engine self.cursor_cls = cursor_cls - def cursor(self): - return self.cursor_cls(self.engine, self.conn) + def cursor(self, *args, **kwargs): + print "DPA", args + print "DPK", kwargs + return self.cursor_cls(self.engine, self.conn, *args, **kwargs) def close(self): self.conn.close()