diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-06-02 11:32:55 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-06-02 11:33:18 +0200 |
commit | 1aefc94dd78d6e0c9209cb09fc16f53dedf42108 (patch) | |
tree | e70097540c60e9274c4000296f9f799533d1c035 /test/functional/rpcbind_test.py | |
parent | 00d369239612c75548187d4da853bf6878a6f91f (diff) | |
parent | 930deb9b2c5a8234d430f0a739c97e1fc961ffad (diff) | |
download | bitcoin-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/rpcbind_test.py')
-rwxr-xr-x | test/functional/rpcbind_test.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/functional/rpcbind_test.py b/test/functional/rpcbind_test.py index efc36481d1..d8ab4e6f98 100755 --- a/test/functional/rpcbind_test.py +++ b/test/functional/rpcbind_test.py @@ -7,7 +7,7 @@ import socket import sys -from test_framework.test_framework import BitcoinTestFramework +from test_framework.test_framework import BitcoinTestFramework, SkipTest from test_framework.util import * from test_framework.netutil import * @@ -56,8 +56,7 @@ class RPCBindTest(BitcoinTestFramework): def run_test(self): # due to OS-specific network stats queries, this test works only on Linux if not sys.platform.startswith('linux'): - self.log.warning("This test can only be run on linux. Skipping test.") - sys.exit(self.TEST_EXIT_SKIPPED) + raise SkipTest("This test can only be run on linux.") # find the first non-loopback interface for testing non_loopback_ip = None for name,ip in all_interfaces(): @@ -65,15 +64,13 @@ class RPCBindTest(BitcoinTestFramework): non_loopback_ip = ip break if non_loopback_ip is None: - self.log.warning("This test requires at least one non-loopback IPv4 interface. Skipping test.") - sys.exit(self.TEST_EXIT_SKIPPED) + raise SkipTest("This test requires at least one non-loopback IPv4 interface.") try: s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) s.connect(("::1",1)) s.close except OSError: - self.log.warning("This test requires IPv6 support. Skipping test.") - sys.exit(self.TEST_EXIT_SKIPPED) + raise SkipTest("This test requires IPv6 support.") self.log.info("Using interface %s for testing" % non_loopback_ip) |