From: Tim Peters Date: Fri, 7 Dec 2001 21:35:42 +0000 (+0000) Subject: SF patch 490393: test___all__ and Jython; from Finn Bock. X-Git-Tag: v2.2.1c1~475 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbfc0343fc66cb4bd7f962698c81ff74b94ea554;p=thirdparty%2FPython%2Fcpython.git SF patch 490393: test___all__ and Jython; from Finn Bock. Don't even try to import _socket when running under Jython. --- diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 08df6b2b2676..4a4103632fb6 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -35,9 +35,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 +if not sys.platform.startswith('java'): + # 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")