Skip to content

Commit 677d893

Browse files
committed
[tests] do not allow assert_raises_message to be called with JSONRPCException
1 parent 5864e9c commit 677d893

File tree

1 file changed

+2
-0
lines changed
  • test/functional/test_framework

1 file changed

+2
-0
lines changed

test/functional/test_framework/util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def assert_raises(exc, fun, *args, **kwds):
5151
def assert_raises_message(exc, message, fun, *args, **kwds):
5252
try:
5353
fun(*args, **kwds)
54+
except JSONRPCException:
55+
raise AssertionError("Use assert_raises_jsonrpc() to test RPC failures")
5456
except exc as e:
5557
if message is not None and message not in e.error['message']:
5658
raise AssertionError("Expected substring not found:" + e.error['message'])

0 commit comments

Comments
 (0)