[Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,1.17,1.18

Greg Ward gward@users.sourceforge.net
2001年8月04日 15:22:21 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv25231
Modified Files:
	test___all__.py 
Log Message:
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.
Index: test___all__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test___all__.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** test___all__.py	2001年03月01日 04:27:19	1.17
--- test___all__.py	2001年08月04日 22:22:19	1.18
***************
*** 39,42 ****
--- 39,46 ----
 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")

AltStyle によって変換されたページ (->オリジナル) /