From cbce202f827e113ef4d15bf3f4fb4accc6f779de Mon Sep 17 00:00:00 2001
From: Greg Ward <gward@python.net>
Date: Sat, 4 Aug 2001 22:22:19 +0000
Subject: [PATCH] Hack to workaround bug #445984: attempt to import _socket
 before starting the test suite proper.  If _socket fails to build, that will
 make this test fail with an ImportError -- handled by the test harness as "no
 such module _socket" -- instead of an AttributeError deep in CGIHTTPServer.

---
 Lib/test/test___all__.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index 2cc021b47d..550867038f 100644
--- a/Lib/test/test___all__.py
+++ b/Lib/test/test___all__.py
@@ -38,6 +38,10 @@ def check_all(modname):
     all.sort()
     verify(keys==all, "%s != %s" % (keys, all))
 
+# In case _socket fails to build, make this test fail more gracefully
+# than an AttributeError somewhere deep in CGIHTTPServer.
+import _socket
+    
 check_all("BaseHTTPServer")
 check_all("CGIHTTPServer")
 check_all("ConfigParser")
-- 
2.40.0