test: cover UNIX sockets in feature_proxy.py

This commit is contained in:
Matthew Zipkin
2023-05-26 14:24:27 -04:00
parent c65c0d0163
commit bfe5192891
2 changed files with 89 additions and 8 deletions

View File

@@ -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