[tests] skip rpc_zmq functional test when python3 zmq lib is not present

Also refactors zmq-related test skipping logic into distinct functions.
This commit is contained in:
James O'Beirne
2018-07-12 11:52:02 -04:00
parent dcb154e5aa
commit a0b604c166
3 changed files with 26 additions and 15 deletions

View File

@@ -4,7 +4,8 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test for the ZMQ RPC methods."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import (
BitcoinTestFramework, skip_if_no_py3_zmq, skip_if_no_bitcoind_zmq)
from test_framework.util import assert_equal
@@ -17,6 +18,8 @@ class RPCZMQTest(BitcoinTestFramework):
self.setup_clean_chain = True
def run_test(self):
skip_if_no_py3_zmq()
skip_if_no_bitcoind_zmq(self)
self._test_getzmqnotifications()
def _test_getzmqnotifications(self):