mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-09 13:57:30 +08:00
PL/Python: Adjust the regression tests for Python 3.3
The string representation of ImportError changed. Remove printing that; it's not necessary for the test. The order in which members of a dict are printed changed. But this was always implementation-dependent, so we have just been lucky for a long time. Do the printing the hard way to ensure sorted order.
This commit is contained in:
@ -75,8 +75,14 @@ if 'relid' in TD:
|
||||
skeys = list(TD.keys())
|
||||
skeys.sort()
|
||||
for key in skeys:
|
||||
val = TD[key]
|
||||
plpy.notice("TD[" + key + "] => " + str(val))
|
||||
val = TD[key]
|
||||
if not isinstance(val, dict):
|
||||
plpy.notice("TD[" + key + "] => " + str(val))
|
||||
else:
|
||||
# print dicts the hard way because otherwise the order is implementation-dependent
|
||||
valkeys = list(val.keys())
|
||||
valkeys.sort()
|
||||
plpy.notice("TD[" + key + "] => " + '{' + ', '.join([repr(k) + ': ' + repr(val[k]) for k in valkeys]) + '}')
|
||||
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user