From: Mike Bayer Date: Sun, 2 Sep 2012 20:17:10 +0000 (-0400) Subject: - further mxodbc tweaks affecting other test suites X-Git-Tag: rel_0_8_0b1~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48f5c2e4f7b01e075c587d3ae650eba29a1fe36e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - further mxodbc tweaks affecting other test suites --- diff --git a/lib/sqlalchemy/connectors/mxodbc.py b/lib/sqlalchemy/connectors/mxodbc.py index 752c8b6b05..69a8677e42 100644 --- a/lib/sqlalchemy/connectors/mxodbc.py +++ b/lib/sqlalchemy/connectors/mxodbc.py @@ -131,7 +131,6 @@ class MxODBCConnector(Connector): return tuple(version) def _get_direct(self, context): - return True if context: native_odbc_execute = context.execution_options.\ get('native_odbc_execute', 'auto') diff --git a/test/dialect/test_mssql.py b/test/dialect/test_mssql.py index 1c6f8d02ae..c083a48999 100644 --- a/test/dialect/test_mssql.py +++ b/test/dialect/test_mssql.py @@ -170,15 +170,6 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): select([t]).where(t.c.foo.in_(['x', 'y', 'z'])), "SELECT sometable.foo FROM sometable WHERE sometable.foo " "IN ('x', 'y', 'z')", - ), - ( - func.foobar("x", "y", 4, 5), - "foobar('x', 'y', 4, 5)", - ), - ( - select([t]).where(func.len('xyz') > func.len(t.c.foo)), - "SELECT sometable.foo FROM sometable WHERE len('xyz') > " - "len(sometable.foo)", ) ]: self.assert_compile(expr, compile, dialect=mxodbc_dialect) diff --git a/test/dialect/test_mxodbc.py b/test/dialect/test_mxodbc.py index 78f8ba6982..285b8863f8 100644 --- a/test/dialect/test_mxodbc.py +++ b/test/dialect/test_mxodbc.py @@ -30,7 +30,10 @@ class MockCursor(object): def __init__(self, parent): self.parent = parent def execute(self, *args, **kwargs): - self.parent.parent.log.append('execute') + if kwargs.get('direct', False): + self.executedirect() + else: + self.parent.parent.log.append('execute') def executedirect(self, *args, **kwargs): self.parent.parent.log.append('executedirect') def close(self):