diff options
| author | Michael Trier <mtrier@gmail.com> | 2008-10-21 02:46:43 +0000 |
|---|---|---|
| committer | Michael Trier <mtrier@gmail.com> | 2008-10-21 02:46:43 +0000 |
| commit | 00cec7c0884b6d5d5389a0cb88badd264fa9bedd (patch) | |
| tree | c150a35ccd445ffd8da38d0c2af9ad2f920a479a | |
| parent | 11619ad8eeb137efd84bda67d34414c3c3e00080 (diff) | |
| download | sqlalchemy-00cec7c0884b6d5d5389a0cb88badd264fa9bedd.tar.gz | |
Corrected the is_subquery() check based on recent changes. Excluded the test_in_filtering_advanced test for mssql.
| -rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 2 | ||||
| -rw-r--r-- | test/sql/query.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 2072d5a27..51664d64e 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -180,7 +180,7 @@ class DefaultCompiler(engine.Compiled): return meth(obj, **kwargs) def is_subquery(self): - return self.stack and self.stack[-1].get('from') + return self.stack and len(self.stack) > 1 and self.stack[-1].get('from') def construct_params(self, params=None): """return a dictionary of bind parameter keys and values""" diff --git a/test/sql/query.py b/test/sql/query.py index 4d52c2764..4decf3b68 100644 --- a/test/sql/query.py +++ b/test/sql/query.py @@ -590,7 +590,7 @@ class QueryTest(TestBase): r = s.execute(search_key=None).fetchall() assert len(r) == 0 - @testing.fails_on('firebird', 'maxdb', 'oracle') + @testing.fails_on('firebird', 'maxdb', 'oracle', 'mssql') def test_in_filtering_advanced(self): """test the behavior of the in_() function when comparing against an empty collection.""" |
