[Pkg-bitcoin-commits] [bitcoin] 76/126: [tests] do not allow assert_raises_message to be called with JSONRPCException
Jonas Smedegaard
dr at jones.dk
Mon Nov 13 20:02:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.15.1_dfsg-1
in repository bitcoin.
commit 623de0acbb7a586adba8d1f9a64c77fabb0e98a4
Author: John Newbery <john at johnnewbery.com>
Date: Wed Jul 12 10:29:21 2017 -0400
[tests] do not allow assert_raises_message to be called with JSONRPCException
Github-Pull: #10853
Rebased-From: 677d893ff758b61f66203730da224bd7ef8f0b43
---
test/functional/test_framework/util.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 44d7e04..ed35bf5 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -51,6 +51,8 @@ def assert_raises(exc, fun, *args, **kwds):
def assert_raises_message(exc, message, fun, *args, **kwds):
try:
fun(*args, **kwds)
+ except JSONRPCException:
+ raise AssertionError("Use assert_raises_jsonrpc() to test RPC failures")
except exc as e:
if message is not None and message not in e.error['message']:
raise AssertionError("Expected substring not found:" + e.error['message'])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/bitcoin.git
More information about the Pkg-bitcoin-commits
mailing list