Skip to content

Commit d0765d5

Browse files
committed
PL/Python: Adjust the regression tests for Python 3.4
The error test case in the plpython_do test resulted in a slightly different error message with Python 3.4. So pick a different way to test it that avoids that and is perhaps also a bit clearer.
1 parent 322173e commit d0765d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pl/plpython/expected/plpython_do.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ CONTEXT: PL/Python anonymous code block
44
DO $$ plpy.notice("This is plpython2u.") $$ LANGUAGE plpython2u;
55
NOTICE: This is plpython2u.
66
CONTEXT: PL/Python anonymous code block
7-
DO $$ nonsense $$ LANGUAGE plpythonu;
8-
ERROR: NameError: global name 'nonsense' is not defined
7+
DO $$ raise Exception("error test") $$ LANGUAGE plpythonu;
8+
ERROR: Exception: error test
99
CONTEXT: Traceback (most recent call last):
1010
PL/Python anonymous code block, line 1, in <module>
11-
nonsense
11+
raise Exception("error test")
1212
PL/Python anonymous code block

src/pl/plpython/sql/plpython_do.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ DO $$ plpy.notice("This is plpythonu.") $$ LANGUAGE plpythonu;
22

33
DO $$ plpy.notice("This is plpython2u.") $$ LANGUAGE plpython2u;
44

5-
DO $$ nonsense $$ LANGUAGE plpythonu;
5+
DO $$ raise Exception("error test") $$ LANGUAGE plpythonu;

0 commit comments

Comments
 (0)