Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
test
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/test/test_urllibnet.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�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"���R���(����(����R���t ���test_info@���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(���R���R)���(����(����R���t���test_geturlL���s�����c���������C���s���t��i�d�j�p�t�t�d�ƒ�o�d��Sn�t�i�d�ƒ�}�|�i�ƒ��}�t�i �|�ƒ�}�z�|��i�|�i �ƒ��d�ƒ�Wd��|�i�ƒ��Xd��S(���Nt���win32t���fdopens���http://www.python.org/s<���reading from file created using fd returned by fileno failed(���s���win32(���t���syst���platformR���t���osR ���R ���R���R���t���fdR,���t���FILER���R���R���R���(���R���R���R0���R1���(����(����R���t���test_filenoV���s����!�c���������C���s���|��i�t�t�i�d�ƒ�d��S(���Ns���http://www.python.invalid/(���R���t���assertRaisest���IOErrorR ���R ���(���R���(����(����R���t���test_bad_addressf���s���� ( ���R���R���t���__doc__R���R ���R'���R*���R2���R5���(����(����(����R���R������s��� � t���urlretrieveNetworkTestsc�����������B���s)���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�RS(���s+���Tests urllib.urlretrieve using the network.c���������C���sv���t��i�d�ƒ�\�}�}�|��i�t�i�i�|�ƒ�d�ƒ�t �|�ƒ�}�z�|��i�|�i�ƒ��d�ƒ�Wd��|�i�ƒ��t�i �|�ƒ�Xd��S(���Ns���http://www.python.org/s9���file location returned by urlretrieve is not a valid paths=���reading from the file location returned by urlretrieve failed(���R ���t���urlretrievet ���file_locationR���R���R���R/���t���patht���existst���fileR1���R���R���t���unlink(���R���R���R9���R1���(����(����R���R���v���s����� c���������C���sŒ���t��i�d�t�i�ƒ�\�}�}�|��i�|�t�i�ƒ�|��i�t �i �i�|�ƒ�ƒ�t�|�ƒ�}�z�|��i�|�i�ƒ��d�ƒ�Wd��|�i�ƒ��t �i�|�ƒ�Xd��S(���Ns���http://www.python.org/s"���reading from temporary file failed(���R ���R8���t���test_supportt���TESTFNR9���R���R���R%���R���R/���R:���R;���R<���R1���R���R���R=���(���R���R���R9���R1���(����(����R���t���test_specified_pathƒ���s���� � c���������C���sB���t��i�d�ƒ�\�}�}�t�i�|�ƒ�|��i�t�|�t �i �ƒ�d�ƒ�d��S(���Ns���http://www.python.org/s.���header is not an instance of mimetools.Message(���R ���R8���R9���t���headerR/���R=���R���R���R���R#���R$���(���R���R9���RA���(����(����R���t���test_header���s���� (���R���R���R6���R���R@���RB���(����(����(����R���R7���s���s���� c�����������C���s$���t��i�d�ƒ�t��i�t�t�t�ƒ�d��S(���Nt���network(���R>���t���requirest���run_unittestR����R���R7���(����(����(����R���t ���test_main™���s���� t���__main__(���t���unittestt���testR>���R���R ���R-���R/���R#���t���TestCaseR����R���R7���RF���R���(���R>���R#���R���R����RH���R���R ���R-���RF���R7���R/���(����(����R���t���?���s��� Y&