@@ -70,17 +70,17 @@ def test_DictCursor(self):
7070 bob , r , 'fetch a 1 row result via iteration failed via DictCursor' ,
7171 )
7272 # get all 3 row via fetchall
73- c .execute ('SELECT * from dictcursor' )
73+ c .execute ('SELECT * from dictcursor ORDER BY name ' )
7474 r = c .fetchall ()
75- self .assertEqual ([bob , jim , fred ], r , 'fetchall failed via DictCursor' )
75+ self .assertEqual ([bob , fred , jim ], r , 'fetchall failed via DictCursor' )
7676 # same test again but do a list comprehension
77- c .execute ('SELECT * from dictcursor' )
77+ c .execute ('SELECT * from dictcursor ORDER BY name ' )
7878 r = list (c )
79- self .assertEqual ([bob , jim , fred ], r , 'DictCursor should be iterable' )
79+ self .assertEqual ([bob , fred , jim ], r , 'DictCursor should be iterable' )
8080 # get all 2 row via fetchmany
81- c .execute ('SELECT * from dictcursor' )
81+ c .execute ('SELECT * from dictcursor ORDER BY name ' )
8282 r = c .fetchmany (2 )
83- self .assertEqual ([bob , jim ], r , 'fetchmany failed via DictCursor' )
83+ self .assertEqual ([bob , fred ], r , 'fetchmany failed via DictCursor' )
8484 self ._ensure_cursor_expired (c )
8585
8686 def test_custom_dict (self ):
@@ -101,17 +101,17 @@ class MyDictCursor(self.cursor_type):
101101 self .assertEqual (bob , r , 'fetchone() returns MyDictCursor' )
102102 self ._ensure_cursor_expired (cur )
103103
104- cur .execute ('SELECT * FROM dictcursor' )
104+ cur .execute ('SELECT * FROM dictcursor ORDER BY name ' )
105105 r = cur .fetchall ()
106- self .assertEqual ([bob , jim , fred ], r , 'fetchall failed via MyDictCursor' )
106+ self .assertEqual ([bob , fred , jim ], r , 'fetchall failed via MyDictCursor' )
107107
108- cur .execute ('SELECT * FROM dictcursor' )
108+ cur .execute ('SELECT * FROM dictcursor ORDER BY name ' )
109109 r = list (cur )
110- self .assertEqual ([bob , jim , fred ], r , 'list failed via MyDictCursor' )
110+ self .assertEqual ([bob , fred , jim ], r , 'list failed via MyDictCursor' )
111111
112- cur .execute ('SELECT * FROM dictcursor' )
112+ cur .execute ('SELECT * FROM dictcursor ORDER BY name ' )
113113 r = cur .fetchmany (2 )
114- self .assertEqual ([bob , jim ], r , 'list failed via MyDictCursor' )
114+ self .assertEqual ([bob , fred ], r , 'list failed via MyDictCursor' )
115115 self ._ensure_cursor_expired (cur )
116116
117117
0 commit comments