diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-04-24 11:16:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-04-24 11:16:03 -0400 |
commit | 5c5634c04f6c64c8c95469d4c05ed4adaf5eabe2 (patch) | |
tree | 1c406991c9b06c33c1722e4039a1c6475b2cc394 /test/dialect/test_mssql.py | |
parent | cb3913a186a01d9425e0ba97de89aa6d7d64ab96 (diff) | |
download | sqlalchemy-5c5634c04f6c64c8c95469d4c05ed4adaf5eabe2.tar.gz |
- [bug] removed legacy behavior whereby
a column comparison to a scalar SELECT via
== would coerce to an IN with the SQL server
dialect. This is implicit
behavior which fails in other scenarios
so is removed. Code which relies on this
needs to be modified to use column.in_(select)
explicitly. [ticket:2277]
Diffstat (limited to 'test/dialect/test_mssql.py')
-rw-r--r-- | test/dialect/test_mssql.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/dialect/test_mssql.py b/test/dialect/test_mssql.py index 74e96c8ef..6ae0dfc45 100644 --- a/test/dialect/test_mssql.py +++ b/test/dialect/test_mssql.py @@ -183,10 +183,9 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): ]: self.assert_compile(expr, compile, dialect=mxodbc_dialect) - @testing.uses_deprecated def test_in_with_subqueries(self): - """Test that when using subqueries in a binary expression - the == and != are changed to IN and NOT IN respectively. + """Test removal of legacy behavior that converted "x==subquery" + to use IN. """ @@ -194,14 +193,14 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): self.assert_compile(t.select().where(t.c.somecolumn == t.select()), 'SELECT sometable.somecolumn FROM ' - 'sometable WHERE sometable.somecolumn IN ' + 'sometable WHERE sometable.somecolumn = ' '(SELECT sometable.somecolumn FROM ' 'sometable)') self.assert_compile(t.select().where(t.c.somecolumn != t.select()), 'SELECT sometable.somecolumn FROM ' - 'sometable WHERE sometable.somecolumn NOT ' - 'IN (SELECT sometable.somecolumn FROM ' + 'sometable WHERE sometable.somecolumn != ' + '(SELECT sometable.somecolumn FROM ' 'sometable)') def test_count(self): |