Changeset View
Changeset View
Standalone View
Standalone View
test/functional/interface_zmq.py
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | def setup_nodes(self): | ||||
# Try to import python3-zmq. Skip this test if the import fails. | # Try to import python3-zmq. Skip this test if the import fails. | ||||
try: | try: | ||||
import zmq | import zmq | ||||
except ImportError: | except ImportError: | ||||
raise SkipTest("python3-zmq module not available.") | raise SkipTest("python3-zmq module not available.") | ||||
# Check that bitcoin has been built with ZMQ enabled. | # Check that bitcoin has been built with ZMQ enabled. | ||||
config = configparser.ConfigParser() | config = configparser.ConfigParser() | ||||
config.read_file(open(self.options.configfile)) | config.read_file(open(self.options.configfile, encoding='utf-8')) | ||||
if not config["components"].getboolean("ENABLE_ZMQ"): | if not config["components"].getboolean("ENABLE_ZMQ"): | ||||
raise SkipTest("bitcoind has not been built with zmq enabled.") | raise SkipTest("bitcoind has not been built with zmq enabled.") | ||||
# Initialize ZMQ context and socket. | # Initialize ZMQ context and socket. | ||||
# All messages are received in the same socket which means that this | # All messages are received in the same socket which means that this | ||||
# test fails if the publishing order changes. | # test fails if the publishing order changes. | ||||
# Note that the publishing order is not defined in the documentation and | # Note that the publishing order is not defined in the documentation and | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |