diff options
author | Jason Kirtland <jek@discorporate.us> | 2007-04-27 00:29:23 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2007-04-27 00:29:23 +0000 |
commit | 6a30f0ee3701172c37f03306731e4b14fe6acffb (patch) | |
tree | 9bc40b8bde1a3896645e86a7b9a159a5ac1d58cf | |
parent | 683ff64c4b6a142ba219ac53d50d1280b84c1b2a (diff) | |
download | sqlalchemy-6a30f0ee3701172c37f03306731e4b14fe6acffb.tar.gz |
- Fully specify ordering for ordered union test comparison
-rw-r--r-- | test/sql/query.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sql/query.py b/test/sql/query.py index a3088ba2f..a6b69fb7d 100644 --- a/test/sql/query.py +++ b/test/sql/query.py @@ -422,10 +422,10 @@ class CompoundTest(PersistTest): def test_union(self): (s1, s2) = ( - select([t1.c.col3.label('col3'), t1.c.col4], t1.c.col2.in_("t1col2r1", "t1col2r2")), - select([t2.c.col3.label('col3'), t2.c.col4], t2.c.col2.in_("t2col2r2", "t2col2r3")) + select([t1.c.col3.label('col3'), t1.c.col4.label('col4')], t1.c.col2.in_("t1col2r1", "t1col2r2")), + select([t2.c.col3.label('col3'), t2.c.col4.label('col4')], t2.c.col2.in_("t2col2r2", "t2col2r3")) ) - u = union(s1, s2, order_by=['col3']) + u = union(s1, s2, order_by=['col3', 'col4']) assert u.execute().fetchall() == [('aaa', 'aaa'), ('bbb', 'bbb'), ('bbb', 'ccc'), ('ccc', 'aaa')] assert u.alias('bar').select().execute().fetchall() == [('aaa', 'aaa'), ('bbb', 'bbb'), ('bbb', 'ccc'), ('ccc', 'aaa')] |