summaryrefslogtreecommitdiffstats
path: root/Lib/test/test___all__.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2001-08-04 22:22:19 (GMT)
committerGreg Ward <gward@python.net>2001-08-04 22:22:19 (GMT)
commitcbce202f827e113ef4d15bf3f4fb4accc6f779de (patch)
tree5b33f510650a5afd7b006f9d7910467de8ce282d /Lib/test/test___all__.py
parent60fc707be51c597d13496e544fd817b6a1566be4 (diff)
downloadcpython-cbce202f827e113ef4d15bf3f4fb4accc6f779de.zip
cpython-cbce202f827e113ef4d15bf3f4fb4accc6f779de.tar.gz
cpython-cbce202f827e113ef4d15bf3f4fb4accc6f779de.tar.bz2
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.
Diffstat (limited to 'Lib/test/test___all__.py')
-rw-r--r--Lib/test/test___all__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index 2cc021b..5508670 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")