From 6a30f0ee3701172c37f03306731e4b14fe6acffb Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Fri, 27 Apr 2007 00:29:23 +0000 Subject: [PATCH] - Fully specify ordering for ordered union test comparison --- test/sql/query.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/sql/query.py b/test/sql/query.py index a3088ba2ff..a6b69fb7d6 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')] -- 2.47.2