diff options
| author | Ants Aasma <ants.aasma@gmail.com> | 2008-10-20 20:41:09 +0000 |
|---|---|---|
| committer | Ants Aasma <ants.aasma@gmail.com> | 2008-10-20 20:41:09 +0000 |
| commit | 11619ad8eeb137efd84bda67d34414c3c3e00080 (patch) | |
| tree | b6f0265f2d81b2497e4fd2f4d3dc53bf23112ac3 /test/sql/query.py | |
| parent | 9dd05715de7e673b5ab4af8eb84b719f8d5e66ff (diff) | |
| download | sqlalchemy-11619ad8eeb137efd84bda67d34414c3c3e00080.tar.gz | |
Slightly changed behavior of IN operator for comparing to empty collections. Now results in inequality comparison against self. More portable, but breaks with stored procedures that aren't pure functions.
Diffstat (limited to 'test/sql/query.py')
| -rw-r--r-- | test/sql/query.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/sql/query.py b/test/sql/query.py index c5b9b5d35..4d52c2764 100644 --- a/test/sql/query.py +++ b/test/sql/query.py @@ -550,7 +550,6 @@ class QueryTest(TestBase): finally: shadowed.drop(checkfirst=True) - @testing.fails_on('firebird', 'maxdb', 'oracle') def test_in_filtering(self): """test the behavior of the in_() function.""" @@ -591,6 +590,14 @@ class QueryTest(TestBase): r = s.execute(search_key=None).fetchall() assert len(r) == 0 + @testing.fails_on('firebird', 'maxdb', 'oracle') + def test_in_filtering_advanced(self): + """test the behavior of the in_() function when comparing against an empty collection.""" + + users.insert().execute(user_id = 7, user_name = 'jack') + users.insert().execute(user_id = 8, user_name = 'fred') + users.insert().execute(user_id = 9, user_name = None) + s = users.select(users.c.user_name.in_([]) == True) r = s.execute().fetchall() assert len(r) == 0 |
