diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-03-27 16:58:21 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-03-27 16:58:21 +0000 |
commit | 9b59ddfb403af197c6ec8df8f8673bd9c033106d (patch) | |
tree | 413a310f73e459c4c45e674a6f433d32dfc579da /src/pl/plpython/plpython_function.sql | |
parent | c75d65485d1025c6ec62044e46ac74d467f1243b (diff) | |
download | postgresql-9b59ddfb403af197c6ec8df8f8673bd9c033106d.tar.gz postgresql-9b59ddfb403af197c6ec8df8f8673bd9c033106d.zip |
It may not be obvious to you, but the plpython regression tests
include output that vary depending on the python build one is
running. Basically, the order of keys in a dictionary is
non-deterministic, and that part of the test fails for me regularly.
I rewrote the test to work around this problem, and include a patch
file with that change and the change to the expected otuput as well.
Mike Meyer
Diffstat (limited to 'src/pl/plpython/plpython_function.sql')
-rw-r--r-- | src/pl/plpython/plpython_function.sql | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pl/plpython/plpython_function.sql b/src/pl/plpython/plpython_function.sql index 46ab4babd35..2769e9de36f 100644 --- a/src/pl/plpython/plpython_function.sql +++ b/src/pl/plpython/plpython_function.sql @@ -82,7 +82,12 @@ return "sha hash of " + plain + " is " + digest.hexdigest()' CREATE FUNCTION argument_test_one(users, text, text) RETURNS text AS -'words = args[1] + " " + args[2] + " => " + str(args[0]) +'keys = args[0].keys() +keys.sort() +out = [] +for key in keys: + out.append("%s: %s" % (key, args[0][key])) +words = args[1] + " " + args[2] + " => {" + ", ".join(out) + "}" return words' LANGUAGE 'plpython'; |