Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
test
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/test/test_urllib2net.pyo
mò ‚=5Dc @ sš d k Z d k l Z d k Z d k Z d k Z d k Z d k Z d e i f d „ ƒ YZ d e i f d „ ƒ YZ d „ Z e d j o e ƒ n d S( N( s test_supportt URLTimeoutTestc B s) t Z d Z d „ Z d „ Z d „ Z RS( Nf10.0c C s t i | i ƒ d S( N( t sockett setdefaulttimeoutt selft TIMEOUT( R ( ( t* /usr/lib/python2.4/test/test_urllib2net.pyt setUp s c C s t i d ƒ d S( N( R R t None( R ( ( R t tearDown s c C s t i d ƒ } | i ƒ } d S( Ns http://www.python.org/( t urllib2t urlopent ft readt x( R R R ( ( R t testURLread s ( t __name__t __module__R R R R ( ( ( R R s t urlopenNetworkTestsc B s2 t Z d Z d „ Z d „ Z d „ Z d „ Z RS( s6 Tests urllib2.urlopen using the network. These tests are not exhaustive. Assuming that testing using files does a good job overall of some of the basic interface features. There are no tests exercising the optional 'data' and 'proxies' arguments. No tests for transparent redirection have been written. setUp is not used for always constructing a connection to http://www.python.org/ since there a few tests that don't use that address and making a connection is expensive enough to warrant minimizing unneeded connections. c C si t i d ƒ } x+ d D]# } | i t | | ƒ d | ƒ q Wz | i | i ƒ d ƒ Wd | i ƒ Xd S( Ns http://www.python.org/R t closet infot geturls3 object returned from urlopen lacks the %s attributes calling 'read' failed( s reads closeR R ( R R t open_urlt attrR t assert_t hasattrR R ( R R R ( ( R t test_basic) s ! c C sc t i d ƒ } z | i ƒ } Wd | i ƒ | i t | t i ƒ d ƒ | i | i ƒ d ƒ Xd S( Ns http://www.python.org/sA object returned by 'info' is not an instance of mimetools.Messaget html( R R R R t info_objR R R t isinstancet mimetoolst Messaget assertEqualt getsubtype( R R R ( ( R t test_info4 s c C sG d } t i | ƒ } z | i ƒ } Wd | i ƒ X| i | | ƒ d S( Ns http://www.python.org/( t URLR R R R t gotten_urlR R R ( R R"