Changeset View
Changeset View
Standalone View
Standalone View
test/functional/interface_zmq.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test the ZMQ API.""" | """Test the ZMQ API.""" | ||||
import configparser | import configparser | ||||
import os | import os | ||||
import struct | import struct | ||||
from test_framework.test_framework import BitcoinTestFramework, SkipTest | from test_framework.test_framework import BitcoinTestFramework, SkipTest | ||||
from test_framework.util import (assert_equal, | from test_framework.util import ( | ||||
assert_equal, | |||||
bytes_to_hex_str, | bytes_to_hex_str, | ||||
hash256, | hash256, | ||||
) | ) | ||||
class ZMQTest (BitcoinTestFramework): | class ZMQTest (BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
def setup_nodes(self): | 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. | ||||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |