From bfe51928911daf484ae07deb52a7ff0bcb2526ae Mon Sep 17 00:00:00 2001 From: Matthew Zipkin Date: Fri, 26 May 2023 14:24:27 -0400 Subject: test: cover UNIX sockets in feature_proxy.py --- test/functional/test_framework/netutil.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/functional/test_framework') 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 -- cgit v1.2.3