aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMatthew Zipkin <pinheadmz@gmail.com>2023-05-26 14:24:27 -0400
committerMatthew Zipkin <pinheadmz@gmail.com>2024-03-01 14:47:29 -0500
commitbfe51928911daf484ae07deb52a7ff0bcb2526ae (patch)
tree15935e1d024a5ccfd76b1ec2d1c1f57d1d0e1f68 /test/functional/test_framework
parentc65c0d01630b44fa71321ea7ad68d5f9fbb7aefb (diff)
downloadbitcoin-bfe51928911daf484ae07deb52a7ff0bcb2526ae.tar.xz
test: cover UNIX sockets in feature_proxy.py
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/netutil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/test_framework/netutil.py b/test/functional/test_framework/netutil.py
index 30a4a58d6f..08d41fe97f 100644
--- a/test/functional/test_framework/netutil.py
+++ b/test/functional/test_framework/netutil.py
@@ -158,3 +158,12 @@ def test_ipv6_local():
except socket.error:
have_ipv6 = False
return have_ipv6
+
+def test_unix_socket():
+ '''Return True if UNIX sockets are available on this platform.'''
+ try:
+ socket.AF_UNIX
+ except AttributeError:
+ return False
+ else:
+ return True