From 930deb9b2c5a8234d430f0a739c97e1fc961ffad Mon Sep 17 00:00:00 2001 From: John Newbery Date: Thu, 18 May 2017 16:36:39 -0400 Subject: [tests] skipped tests should clean up after themselves --- test/functional/zmq_test.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'test/functional/zmq_test.py') 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) -- cgit v1.2.3