]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF patch 490393: test___all__ and Jython; from Finn Bock.
authorTim Peters <tim.peters@gmail.com>
Fri, 7 Dec 2001 21:35:42 +0000 (21:35 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 7 Dec 2001 21:35:42 +0000 (21:35 +0000)
Don't even try to import _socket when running under Jython.

Lib/test/test___all__.py

index 08df6b2b2676e5a62e11b70e1e52c10ff7e9814a..4a4103632fb66ed65df9bd5a77c45d0a3f84fce7 100644 (file)
@@ -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")