diff options
Diffstat (limited to 'test/sql/test_resultset.py')
| -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): |
