Skip to content

Commit 527ea66

Browse files
committed
PL/Python: Adjust the regression tests for Python 3.3
Similar to 2cfb1c6, the order in which dictionary elements are printed is not reliable. This reappeared in the tests of the string representation of result objects. Reduce the test case to one result set column so that there is no question of order.
1 parent f738156 commit 527ea66

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pl/plpython/expected/plpython_spi.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ plan = plpy.prepare(cmd)
269269
result = plpy.execute(plan)
270270
return str(result)
271271
$$ LANGUAGE plpythonu;
272-
SELECT result_str_test($$SELECT 1 AS foo, '11'::text AS bar UNION SELECT 2, '22'$$);
273-
result_str_test
274-
--------------------------------------------------------------------------------------
275-
<PLyResult status=5 nrows=2 rows=[{'foo': 1, 'bar': '11'}, {'foo': 2, 'bar': '22'}]>
272+
SELECT result_str_test($$SELECT 1 AS foo UNION SELECT 2$$);
273+
result_str_test
274+
------------------------------------------------------------
275+
<PLyResult status=5 nrows=2 rows=[{'foo': 1}, {'foo': 2}]>
276276
(1 row)
277277

278278
SELECT result_str_test($$CREATE TEMPORARY TABLE foo1 (a int, b text)$$);

src/pl/plpython/sql/plpython_spi.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ result = plpy.execute(plan)
176176
return str(result)
177177
$$ LANGUAGE plpythonu;
178178

179-
SELECT result_str_test($$SELECT 1 AS foo, '11'::text AS bar UNION SELECT 2, '22'$$);
179+
SELECT result_str_test($$SELECT 1 AS foo UNION SELECT 2$$);
180180
SELECT result_str_test($$CREATE TEMPORARY TABLE foo1 (a int, b text)$$);
181181

182182
-- cursor objects

0 commit comments

Comments
 (0)