diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-02 16:17:10 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-02 16:17:10 -0400 |
commit | 48f5c2e4f7b01e075c587d3ae650eba29a1fe36e (patch) | |
tree | 18f9f88e8299233f8ebef6fa8152b7c61bfd3579 | |
parent | c377b3daa96ec6747b554982a96070dd17701dfb (diff) | |
download | sqlalchemy-48f5c2e4f7b01e075c587d3ae650eba29a1fe36e.tar.gz |
- further mxodbc tweaks affecting other test suites
-rw-r--r-- | lib/sqlalchemy/connectors/mxodbc.py | 1 | ||||
-rw-r--r-- | test/dialect/test_mssql.py | 9 | ||||
-rw-r--r-- | test/dialect/test_mxodbc.py | 5 |
3 files changed, 4 insertions, 11 deletions
diff --git a/lib/sqlalchemy/connectors/mxodbc.py b/lib/sqlalchemy/connectors/mxodbc.py index 752c8b6b0..69a8677e4 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 1c6f8d02a..c083a4899 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 78f8ba698..285b8863f 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): |