diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-21 15:21:33 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-21 15:21:33 -0500 |
| commit | 89fa08792e98b9e31452aa3c949d9b909b10e7cd (patch) | |
| tree | 4c17c645fc7e61a8ba24d2360b0d2d09518a7ea4 /test | |
| parent | 963aa3029742b4f52082f5ea89fac2100130e15b (diff) | |
| download | sqlalchemy-89fa08792e98b9e31452aa3c949d9b909b10e7cd.tar.gz | |
- documenation updates to clarify specific SQLite versions
that have problems with right-nested joins and UNION column keys;
references #3633 references #3634. backport from 1.1 to 0.9
announcing 1.1 as where these behaviors will be retired based
on version-specific checks
- fix test_resultset so that it passes when SQLite 3.10.0 is
present, references #3633
Diffstat (limited to 'test')
| -rw-r--r-- | test/sql/test_resultset.py | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/test/sql/test_resultset.py b/test/sql/test_resultset.py index d7dc9edc3..ec9f24963 100644 --- a/test/sql/test_resultset.py +++ b/test/sql/test_resultset.py @@ -318,7 +318,7 @@ class ResultProxyTest(fixtures.TablesTest): dict(user_id=1, user_name='john'), ) - # test a little sqlite weirdness - with the UNION, + # test a little sqlite < 3.10.0 weirdness - with the UNION, # cols come back as "users.user_id" in cursor.description r = testing.db.execute( text( @@ -332,7 +332,6 @@ class ResultProxyTest(fixtures.TablesTest): eq_(r['user_name'], "john") eq_(list(r.keys()), ["user_id", "user_name"]) - @testing.only_on("sqlite", "sqlite specific feature") def test_column_accessor_sqlite_raw(self): users = self.tables.users @@ -347,13 +346,22 @@ class ResultProxyTest(fixtures.TablesTest): "users.user_name from users", bind=testing.db).execution_options(sqlite_raw_colnames=True). \ execute().first() - not_in_('user_id', r) - not_in_('user_name', r) - eq_(r['users.user_id'], 1) - eq_(r['users.user_name'], "john") - eq_(list(r.keys()), ["users.user_id", "users.user_name"]) - @testing.only_on("sqlite", "sqlite specific feature") + if testing.against("sqlite < 3.10.0"): + not_in_('user_id', r) + not_in_('user_name', r) + eq_(r['users.user_id'], 1) + eq_(r['users.user_name'], "john") + + eq_(list(r.keys()), ["users.user_id", "users.user_name"]) + else: + not_in_('users.user_id', r) + not_in_('users.user_name', r) + eq_(r['user_id'], 1) + eq_(r['user_name'], "john") + + eq_(list(r.keys()), ["user_id", "user_name"]) + def test_column_accessor_sqlite_translated(self): users = self.tables.users @@ -369,8 +377,10 @@ class ResultProxyTest(fixtures.TablesTest): bind=testing.db).execute().first() eq_(r['user_id'], 1) eq_(r['user_name'], "john") - eq_(r['users.user_id'], 1) - eq_(r['users.user_name'], "john") + + if testing.against("sqlite < 3.10.0"): + eq_(r['users.user_id'], 1) + eq_(r['users.user_name'], "john") eq_(list(r.keys()), ["user_id", "user_name"]) def test_column_accessor_labels_w_dots(self): |
