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

Commitfa03769

Browse files
committed
Tweak tests to support Python 3.7
Python 3.7 removes the trailing comma in the repr() ofBaseException (see <https://bugs.python.org/issue30399>), leading totest output differences. Work around that by composing the equivalenttest output in a more manual way.
1 parent8f9be26 commitfa03769

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/pl/plpython/expected/plpython_subtransaction.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ with plpy.subtransaction():
134134
except plpy.SPIError, e:
135135
if not swallow:
136136
raise
137-
plpy.notice("Swallowed %r" %e)
137+
plpy.notice("Swallowed %s(%r)" %(e.__class__.__name__, e.args[0]))
138138
return "ok"
139139
$$ LANGUAGE plpythonu;
140140
SELECT subtransaction_nested_test();
@@ -153,7 +153,7 @@ SELECT * FROM subtransaction_tbl;
153153

154154
TRUNCATE subtransaction_tbl;
155155
SELECT subtransaction_nested_test('t');
156-
NOTICE: Swallowed SyntaxError('syntax error at or near "error"',)
156+
NOTICE: Swallowed SyntaxError('syntax error at or near "error"')
157157
subtransaction_nested_test
158158
----------------------------
159159
ok
@@ -178,7 +178,7 @@ with plpy.subtransaction():
178178
return "ok"
179179
$$ LANGUAGE plpythonu;
180180
SELECT subtransaction_deeply_nested_test();
181-
NOTICE: Swallowed SyntaxError('syntax error at or near "error"',)
181+
NOTICE: Swallowed SyntaxError('syntax error at or near "error"')
182182
subtransaction_deeply_nested_test
183183
-----------------------------------
184184
ok

‎src/pl/plpython/sql/plpython_subtransaction.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ with plpy.subtransaction():
8080
exceptplpy.SPIError, e:
8181
if not swallow:
8282
raise
83-
plpy.notice("Swallowed %r" %e)
83+
plpy.notice("Swallowed %s(%r)" %(e.__class__.__name__,e.args[0]))
8484
return"ok"
8585
$$ LANGUAGE plpythonu;
8686

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp