mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-11 16:47:46 +08:00
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
This commit is contained in:
@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user