socket.gethostbyname(socket.gethostname()) can fail when host name resolution is not set up correctly; do not fail test_socket if this is the case.
diff --git a/Misc/NEWS b/Misc/NEWS
index 530cc6f..b9e8d16 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -46,6 +46,9 @@
 Tests
 -----
 
+- Do not fail test_socket when the IP address of the local hostname
+  cannot be looked up.
+
 - Issue #8886: Use context managers throughout test_zipfile. Patch by
   Eric Carstensen.