diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-08-07 13:28:45 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-08-07 13:28:45 -0500 |
| commit | 34ef21909bd6ed3574e37c345ca9e10761f087bd (patch) | |
| tree | 070bc12f5a9fe9664054997822a410c9cfeee09b /test/sql/test_operators.py | |
| parent | fe34b4ee63d498d385ab029dcee966de9f0203ec (diff) | |
| download | sqlalchemy-34ef21909bd6ed3574e37c345ca9e10761f087bd.tar.gz | |
- The :meth:`.Operators.notin_` operator added in 0.8 now properly
produces the negation of the expression "IN" returns
when used against an empty collection. Also in 0.8.3.
Diffstat (limited to 'test/sql/test_operators.py')
| -rw-r--r-- | test/sql/test_operators.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py index b3919d0da..ce91c5b5e 100644 --- a/test/sql/test_operators.py +++ b/test/sql/test_operators.py @@ -768,6 +768,17 @@ class InTest(fixtures.TestBase, testing.AssertsCompiledSQL): "mytable.myid IN (NULL)" ) + @testing.emits_warning('.*empty sequence.*') + def test_in_29(self): + self.assert_compile(self.table1.c.myid.notin_([]), + "mytable.myid = mytable.myid") + + @testing.emits_warning('.*empty sequence.*') + def test_in_30(self): + self.assert_compile(~self.table1.c.myid.in_([]), + "mytable.myid = mytable.myid") + + class MathOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL): __dialect__ = 'default' |
