aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2014-04-29 22:16:16 -0400
committerPeter Eisentraut <peter_e@gmx.net>2014-04-29 22:16:16 -0400
commitd0765d50f429472d00554701ac6531c84d324811 (patch)
treee998804b6b0e65f3d9808fc0018f1eb043356fe7 /src
parent322173eb0a6c2f43394645f8ae33eedd70bab432 (diff)
downloadpostgresql-d0765d50f429472d00554701ac6531c84d324811.tar.gz
postgresql-d0765d50f429472d00554701ac6531c84d324811.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/expected/plpython_do.out6
-rw-r--r--src/pl/plpython/sql/plpython_do.sql2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pl/plpython/expected/plpython_do.out b/src/pl/plpython/expected/plpython_do.out
index d979cf811c7..09778120843 100644
--- a/src/pl/plpython/expected/plpython_do.out
+++ b/src/pl/plpython/expected/plpython_do.out
@@ -4,9 +4,9 @@ CONTEXT: PL/Python anonymous code block
DO $$ plpy.notice("This is plpython2u.") $$ LANGUAGE plpython2u;
NOTICE: This is plpython2u.
CONTEXT: PL/Python anonymous code block
-DO $$ nonsense $$ LANGUAGE plpythonu;
-ERROR: NameError: global name 'nonsense' is not defined
+DO $$ raise Exception("error test") $$ LANGUAGE plpythonu;
+ERROR: Exception: error test
CONTEXT: Traceback (most recent call last):
PL/Python anonymous code block, line 1, in <module>
- nonsense
+ raise Exception("error test")
PL/Python anonymous code block
diff --git a/src/pl/plpython/sql/plpython_do.sql b/src/pl/plpython/sql/plpython_do.sql
index beb443f95d1..0e281a08ee8 100644
--- a/src/pl/plpython/sql/plpython_do.sql
+++ b/src/pl/plpython/sql/plpython_do.sql
@@ -2,4 +2,4 @@ DO $$ plpy.notice("This is plpythonu.") $$ LANGUAGE plpythonu;
DO $$ plpy.notice("This is plpython2u.") $$ LANGUAGE plpython2u;
-DO $$ nonsense $$ LANGUAGE plpythonu;
+DO $$ raise Exception("error test") $$ LANGUAGE plpythonu;