aboutsummaryrefslogtreecommitdiff
path: root/test/functional/zmq_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/zmq_test.py')
-rwxr-xr-xtest/functional/zmq_test.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/functional/zmq_test.py b/test/functional/zmq_test.py
index 918e13bcd4..f4d86f1b46 100755
--- a/test/functional/zmq_test.py
+++ b/test/functional/zmq_test.py
@@ -6,9 +6,8 @@
import configparser
import os
import struct
-import sys
-from test_framework.test_framework import BitcoinTestFramework
+from test_framework.test_framework import BitcoinTestFramework, SkipTest
from test_framework.util import *
class ZMQTest (BitcoinTestFramework):
@@ -24,8 +23,7 @@ class ZMQTest (BitcoinTestFramework):
try:
import zmq
except ImportError:
- self.log.warning("python3-zmq module not available. Skipping zmq tests!")
- sys.exit(self.TEST_EXIT_SKIPPED)
+ raise SkipTest("python3-zmq module not available.")
# Check that bitcoin has been built with ZMQ enabled
config = configparser.ConfigParser()
@@ -34,8 +32,7 @@ class ZMQTest (BitcoinTestFramework):
config.read_file(open(self.options.configfile))
if not config["components"].getboolean("ENABLE_ZMQ"):
- self.log.warning("bitcoind has not been built with zmq enabled. Skipping zmq tests!")
- sys.exit(self.TEST_EXIT_SKIPPED)
+ raise SkipTest("bitcoind has not been built with zmq enabled.")
self.zmqContext = zmq.Context()
self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)