aboutsummaryrefslogtreecommitdiff
path: root/test/functional/zmq_test.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-06-02 11:32:55 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-06-02 11:33:18 +0200
commit1aefc94dd78d6e0c9209cb09fc16f53dedf42108 (patch)
treee70097540c60e9274c4000296f9f799533d1c035 /test/functional/zmq_test.py
parent00d369239612c75548187d4da853bf6878a6f91f (diff)
parent930deb9b2c5a8234d430f0a739c97e1fc961ffad (diff)
downloadbitcoin-1aefc94dd78d6e0c9209cb09fc16f53dedf42108.tar.xz
Merge #10423: [tests] skipped tests should clean up after themselves
930deb9 [tests] skipped tests should clean up after themselves (John Newbery) Tree-SHA512: ed486c1cf144c223efa738a66e8bb407089a23002871ef5b15c43d4c08641038a20253fc286853b457d66f37a52c81c16f7988aef90635ac262df6ce7bab9b18
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)