|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21572/root/usr/lib/python2.4/test/ |
Upload File : |
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 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_urllibnet.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 urllibt 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 sD t Z d Z d Z d Z d Z d Z d Z d Z RS( s5 Tests urllib.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 readlinet readlinest filenot closet infot geturls3 object returned from urlopen lacks the %s attributes calling 'read' failed( s reads readlines readliness filenos closes infoR ( 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 } zB | i t | i t d | i t | i t d Wd | i
Xd S( Ns http://www.python.org/s readline did not return a strings readlines did not return a list( R R
R R R t
isinstanceR t
basestringR t listR ( R R ( ( R t test_readlines5 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 R t mimetoolst Messaget assertEqualt
getsubtype( R R"