mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-07 20:27:30 +08:00
PL/Python: Improve test coverage
Add test cases for inline handler of plython2u (when using that language name), and for result object element assignment. There is now at least one test case for every top-level functionality, except plpy.Fatal (annoying to use in regression tests) and result object slice retrieval and slice assignment (which are somewhat broken).
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
DO $$ plpy.notice("This is plpythonu.") $$ LANGUAGE plpythonu;
|
||||
NOTICE: This is plpythonu.
|
||||
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
|
||||
CONTEXT: Traceback (most recent call last):
|
||||
|
||||
Reference in New Issue
Block a user