Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite81fc9b

Browse files
committed
Fix jsonb_plpython tests on older Python versions
Rewrite one test to avoid a case where some Python versions have outputformat differences (Decimal('1') vs Decimal("1")).
1 parent3f44e3d commite81fc9b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

‎contrib/jsonb_plpython/expected/jsonb_plpython.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ LANGUAGE plpythonu
66
TRANSFORM FOR TYPE jsonb
77
AS $$
88
assert isinstance(val, dict)
9-
plpy.info(sorted(val.items()))
9+
assert(val == {'a': 1, 'c': 'NULL'})
1010
return len(val)
1111
$$;
1212
SELECT test1('{"a": 1, "c": "NULL"}'::jsonb);
13-
INFO: [('a', Decimal('1')), ('c', 'NULL')]
1413
test1
1514
-------
1615
2

‎contrib/jsonb_plpython/sql/jsonb_plpython.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LANGUAGE plpythonu
66
TRANSFORM FOR TYPE jsonb
77
AS $$
88
assert isinstance(val, dict)
9-
plpy.info(sorted(val.items()))
9+
assert(val== {'a':1,'c':'NULL'})
1010
return len(val)
1111
$$;
1212

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp