403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_urllib.cpython-315.pyc
R
>lqj�*c��Qs]PHs]PHs]PHs]PHs]PHs]PH$s	]PH(s
]QH,Gs]QH4Gs]QH4Gs]QH4Gs]PHDs]PHHs]PHNs]PHTs]PHXs]PH\s\O0%f\
O2Q2gQsQ%QksQQ	\2sQ
Q\
O<2sQQ
\
O<2s QQ\
O<2s!QQ\
O<\2s"QQ\
O<2s#QQ\
O<2s$QQ\
O<\2s%QQ\
O<2s&QQ\
O<2s'QQ\
O<2s(QQ\
O<2s)Q Q!\
O<2s*Q"Q#\
O<2s+\,Q$6Xc\
OZ2P!P!\cPsCK~h9h)&z;Regression tests for what was in Python 2's "urllib" module)�support)�	os_helper)�
socket_helper)�control_characters_c0ztest requires gethostname()c��[[U22Q*O2o[U2]6Xc
QU*oQU*!)z!Escape char as RFC 2396 specifies:�NNz0%s�%)�hex�ord�upper�len)�char�hex_reprs& �%C:\Python315\\Lib\test\test_urllib.py�	hexescapers=���3�t�9�~�b�!�'�'�)�H�
�8�}����8�#����>��c�```�U1QkQ[O2nUU1QkQ[OO2nURmR!)c�T:`�\sQs]'sn]sU1QksQsQQksQQksQs	Qs
UsP!)�fakehttp.<locals>.FakeSocketc�:�URmP!�N)�buf)�self�data�FakeHTTPConnections&&�r�sendall�$fakehttp.<locals>.FakeSocket.sendall*s���%)��"rc�:�U9O]*
tmU!��)�io_refs)r�args�kwdss&*,r�makefile�%fakehttp.<locals>.FakeSocket.makefile-s���L�L�A��L��Krc�j�UO%cQ![OOV2!�r)�closed�io�BytesIO�read)r�amts&&rr)�!fakehttp.<locals>.FakeSocket.read1s!���{�{�{���:�:�?�?�4�-�-rc�j�UO%cQ![OOV2!r%)r&r'r(�readline)r�lengths&&rr-�%fakehttp.<locals>.FakeSocket.readline6s#���{�{�{���:�:�&�&�t�4�4rc��U9O]*tmUO]6Xc"[OOU2P!P!r)rr'r(�close�rs&rr1�"fakehttp.<locals>.FakeSocket.close;s3���L�L�A��L��|�|�q� ��
�
� � ��&�!r�r)�__name__�
__module__�__qualname__�__firstlineno__rrr"r)r-r1�__static_attributes__�__classdictcell__)�
__classdict__rs@�r�
FakeSocketr's(������	*�	�	.�
	5�
	'�	'rr<c�X:`�\sQs]@snPsU1QksY%c
QsQsUsP!QsUsP!)�$fakehttp.<locals>.FakeHTTPConnectionc�l:�RUO2UmUO[U2mP!r)�fakedata�sock�type�fakesock)rr<s&�r�connect�,fakehttp.<locals>.FakeHTTPConnection.connectEs#���"�4�=�=�1�D�I�"&�)�)�D��J�rc��P!rr4r2s&rr1�*fakehttp.<locals>.FakeHTTPConnection.closeNs��r)rA)	r5r6r7r8rrDr1r9r:)r;r<�
mock_closes@��rrr>@s'������	,��:�

�
�rr)r'r(�http�client�HTTPConnectionr@)r@rHrr<s&f@@r�fakehttprL&s?���'�R�Z�Z�'�2��T�[�[�7�7�� #+����rc�2`�\sQs]UsnQQksQsQsUsP!)�
FakeHTTPMixinc��[VQ5o[OOUmU[OmP!)�rH)rLrIrJrK�_connection_class)rr@rH�fake_http_classs&&& rrL�FakeHTTPMixin.fakehttpVs*��"�8�C��!%���!;�!;���%4����"rc�F�UO[OmP!r)rQrIrJrKr2s&r�
unfakehttp�FakeHTTPMixin.unfakehttp[s��%)�%;�%;����"r)rQ�F)r5r6r7r8rLrUr9r:�r;s@rrNrNUs����5�
<�<rrNc�`�\sQs]_snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsUsP!)�urlopen_FileTestsz�Test urlopen() opening a temporary file.

Try to test as much functionality as possible so as to cut down on reliance
on connecting to the Net for testing.

c�.�[QUOO*Q2Um[	[
OQ2oUOUO2UO2[
OUm	[OO[OUO22Um[O O#QUO*2UmP!SO2h9h)ztest_urllib: %s
�ascii�wb�file:%s)�bytes�	__class__r5�text�openr�TESTFN�writer1�pathname�urllib�parse�quote�os�fsencode�quoted_pathname�request�urlopen�returned_obj)r�fs& r�setUp�urlopen_FileTests.setUpgs����-����0G�0G�G�!�#��	���!�!�4�(��	�
�G�G�D�I�I��
�G�G�I�!�(�(��
�%�|�|�1�1�"�+�+�d�m�m�2L�M���"�N�N�2�2�9�t�?S�?S�3S�T����
�G�G�I�s�	D�Dc��UOO2[O[O
2P!)zShut down the open object)rnr1ri�removerrcr2s&r�tearDown�urlopen_FileTests.tearDownts&�������!�
�	�	�)�"�"�#rc�T�QFDoUOUOU2J!	P!)r))	r)r-�	readlines�filenor1�info�geturl�getcode�__iter__)�
assertHasAttrrn�r�attrs& r�test_interface� urlopen_FileTests.test_interfaceys&��G�D����t�0�0�$�7�Grc�p�UOUOUOO22P!r)�assertEqualrarnr)r2s&r�	test_read�urlopen_FileTests.test_reads%��������D�$5�$5�$:�$:�$<�=rc���UOUOUOO22UOQUOO2Q2P!)rzKcalling readline() after exhausting the file did not return an empty string)r�rarnr-r2s&r�
test_readline�urlopen_FileTests.test_readline�sK��������D�$5�$5�$>�$>�$@�A�����d�/�/�8�8�:�3�	4rc��UOO2oUO[U2]Q2UOU]*UOQ2P!)rz.readlines() returned the wrong number of linesz"readlines() returned improper text)rnrwr�rra)r�
lines_lists& r�test_readlines� urlopen_FileTests.test_readlines�sM���&�&�0�0�2�
�����Z��!�I�	K�����A���	�	�=�	?rc���UOO2oUOU[Q2UO	[
OU[UO22UOQ2P!)zfileno() did not return an intzTReading on the file descriptor returned by fileno() did not return the expected text)	rnrx�assertIsInstance�intr�rir)rra)r�file_nums& r�test_fileno�urlopen_FileTests.test_fileno�sW���$�$�+�+�-�����h��-M�N��������3�t�y�y�>�:�D�I�I�<�	=rc�<�UOO2P!r)rnr1r2s&r�
test_close�urlopen_FileTests.test_close�s��	
�����!rc��UOUOO[OO
2P!r)r�rn�headers�email�message�Messager2s&r�test_headers�urlopen_FileTests.test_headers�s(�����d�/�/�7�7����9N�9N�Orc�v�UOUOOQUO*2P!��file:)r�rn�urlrkr2s&r�test_url�urlopen_FileTests.test_url�s)������*�*�.�.��$�:N�:N�0N�Orc�R�UOUOO2P!r)�assertIsNonern�statusr2s&r�test_status�urlopen_FileTests.test_status�s�����$�+�+�2�2�3rc��UOUOO2[OO
2P!r)r�rnryr�r�r�r2s&r�	test_info�urlopen_FileTests.test_info�s+�����d�/�/�4�4�6��
�
�8M�8M�Nrc�~�UOUOO2QUO*2P!r�)r�rnrzrkr2s&r�test_geturl�urlopen_FileTests.test_geturl�s,������*�*�1�1�3�W�t�?S�?S�5S�Trc�Z�UOUOO22P!r)r�rnr{r2s&r�test_getcode�urlopen_FileTests.test_getcode�s�����$�+�+�3�3�5�6rc�f�UOFDoUOVO2J 	P!r)rnr�ra)r�lines& r�	test_iter�urlopen_FileTests.test_iter�s&���%�%�D����T�9�9�-�&rc��UO[[OOQUO
*2P!)z./)�assertRaises�
ValueErrorrfrlrmrer2s&r�test_relativelocalfile�(urlopen_FileTests.test_relativelocalfile�s'�����*�V�^�^�%;�%;�D�4�=�=�<P�Qrc��QoUO[OO29^tt^2o[OOU2PPP2[OQ6Xc)UOWOOQ2P!UOWOOQ2P!)%fhKu9h)zfile://pythontest.net/foo/bar�ntz\\pythontest.net\foo\barz-file:// scheme is supported only on localhost)r�rf�error�URLErrorrlrmri�namer��	exception�filename�reason)rr��es&  r�test_remote_authority�'urlopen_FileTests.test_remote_authority�s���-��
�
�
�v�|�|�4�4�
5�
5���N�N�"�"�3�'�6�
�7�7�d�?����Q�[�[�1�1�3N�O����Q�[�[�/�/�1`�a�6�
5�s� C�C	�C	)rerkrnra)r5r6r7r8�__doc__rprtr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r9r:rXs@rrZrZ_sl�����U�$�
8�>�4�?�=�"�
P�P�4�O�U�7�.�R�b�brrZc�F`�\sQs]�snQsQsQsQsQsQs	Qs
UsP!)�
ProxyTestsc��UO[O22Um[	[
O2FD5oQUO27fJUOOU2J7	P!)�proxy)	�enterContextr�EnvironmentVarGuard�env�listri�environ�lower�unset)r�ks& rrp�ProxyTests.setUp�sN���$�$�Y�%B�%B�%D�E����b�j�j�!�A��!�'�'�)�#������q�!�"rc��UOOQQ2[OO	2oUOQUQ*2UOOQQ2UO
[OOQ22UO
[OOQ22UO
[OOQ22P!)�NO_PROXY�	localhost�no�0localhost, anotherdomain.com, newdomain.com:1234�anotherdomain.com�anotherdomain.com:8888�newdomain.com:1234)r��setrfrl�getproxies_environmentr��
assertTrue�proxy_bypass_environment�r�proxiess& r�+test_getproxies_environment_keep_no_proxies�6ProxyTests.test_getproxies_environment_keep_no_proxies�s��������Z��-��.�.�7�7�9������g�d�m�4������Z�!S�T�������?�?�@S�T�U�������?�?�@X�Y�Z�������?�?�@T�U�Vrc�*�UOOQQ2[OO	2oUOQUQ*2UOOQQ2[OO	2oUO
QU2UOOQ2UOOQ2P!SOOQ2SOOQ2h9h)�
HTTP_PROXY�http://somewhere:3128rI�REQUEST_METHOD�GET)r�r�rfrlr�r��assertNotInr�r�s& r�test_proxy_cgi_ignore� ProxyTests.test_proxy_cgi_ignore�s���		)��H�H�L�L��'>�?��n�n�;�;�=�G����4�g�f�o�F��H�H�L�L�)�5�1��n�n�;�;�=�G����V�W�-��H�H�N�N�+�,��H�H�N�N�<�(��
�H�H�N�N�+�,��H�H�N�N�<�(�s�BC�8Dc��[OOoUOO	QQ2UOUQ22UOUQ22UOUQ22UOUQ22UOUQ22UOUQ22UOUQ22UOUQ	22UOUQ
22UOUQ22UOUQ22UO
UQ
22UO
UQ22UO
UQ22P!)r�z8localhost, anotherdomain.com, newdomain.com:1234, .d.o.tr��	LocalHost�	LOCALHOSTz
.localhostr�z.newdomain.com:1234z	foo.d.o.tzd.o.tr�z.anotherdomain.com:8888zwww.newdomain.com:1234�prelocalhost�
newdomain.comznewdomain.com:1235�rfrlr�r�r�r��assertFalse�r�bypasss& r�(test_proxy_bypass_environment_host_match�3ProxyTests.test_proxy_bypass_environment_host_match�s �����8�8�������Z�O�	Q�����{�+�,�����{�+�,�����{�+�,�����|�,�-�����3�4�5�����4�5�6�����{�+�,�����w��(�����7�8�9�����8�9�:�����7�8�9������/�0������0�1����� 4�5�6rc��[OOoUOO	QQ2UOUQ22UOUQ22UOO	QQ2UOUQ22UO
UQ22UO
UQ22P!)r��*r�r�z*, anotherdomain.comr�r�r�s& r�*test_proxy_bypass_environment_always_match�5ProxyTests.test_proxy_bypass_environment_always_match�s������8�8�������Z��%������/�0�����3�4�5������Z�!7�8�����2�3�4������0�1����� 4�5�6rc��[OOoUOO	QQ2UOUQ22UOUQ22UOUQ22P!)r�r�z
localhost
zanotherdomain.com:8888
znewdomain.com:1234
)rfrlr�r�r�r�r�s& r�%test_proxy_bypass_environment_newline�0ProxyTests.test_proxy_bypass_environment_newlinesb�����8�8�������Z�G�	I�����
�.�/����� :�;�<����� 6�7�8r)r�)r5r6r7r8rpr�r�r�r�r�r9r:rXs@rr�r��s)����"�	W�
)�7�&7�9�9rr�c�4`�\sQsQsnQsQsQsQsUsP!)�ProxyTests_withOrderedEnv�c�n�[OUm[O2[mP!r)rir��
_saved_env�collections�OrderedDictr2s&rrp�ProxyTests_withOrderedEnv.setUp
s���*�*��� �,�,�.��
rc�2�UO[mP!r)rrir�r2s&rrt�"ProxyTests_withOrderedEnv.tearDowns
���_�_��
rc��P[OQ$Q[OQ$UO[OOQ22UO[OOQ22P[OQ$Q[OQ$[OO
2oUO-U2Q[OQ$Q	[OQ$UO[OOQ22UO[OOQ
22UO[OOQ22UO[OOQ22UO[OOQ22Q[OQ$Q
[OQ$[OO
2oUOQUQ*2P!)��no_proxyr��No_Proxy�	arbitrary�
http_proxyr�r�z%localhost, noproxy.com, my.proxy:1234zxyz.comznoproxy.com:5678z
my.proxy:1234zmy.proxyzhttp://somewhereelse:3128�
Http_ProxyrI)	rir�r�rfrlr�r�r�r�r�s& r�,test_getproxies_environment_prefer_lowercase�FProxyTests_withOrderedEnv.test_getproxies_environment_prefer_lowercases���!#��
�
�:��!,��
�
�:��������@�@��M�N�������@�@��M�N�#%��
�
�<� �#:��
�
�<� ��.�.�7�7�9������W�%�!H��
�
�:��!*��
�
�:��������?�?��L�M�������?�?�@R�S�T�������?�?��P�Q�������@�@��L�M�������@�@��M�N�#:��
�
�<� �#>��
�
�<� ��.�.�7�7�9�����0�'�&�/�Br)r)	r5r6r7r8rprtrr9r:rXs@rr�r�s����/�%�C�Crr�c�T`�\sQsQsnQsQsQsQs\O\
Q2Q2s\O\
Q2Q2s\O\
Q2Q	2s
\O\
Q2Q
2sQsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsUsP!)�urlopen_HttpTests�/z.Test urlopen() opening a fake http connection.c���UOQU*Q*2[OOQ2oUO	UO2Q2UO	UO2Q2UO	UO
2Q2UO	UO2]�2UO2P!SO2h9h)sHTTP/s 200 OK

Hello!�http://python.org/sHello!r)	rLrfrlrmr�r-rzr{rU)r�ver�fps&& r�
check_read�urlopen_HttpTests.check_read2s����
�
�h��n�'?�?�@�	����'�'�(<�=�B����R�[�[�]�I�6����R�[�[�]�C�0����R�Y�Y�[�*>�?����R�Z�Z�\�3�/��O�O���D�O�O��s�BC�C%c��QoUOQ2[OOU2oUO	UO2U2UO
2P!SO
2h9h)z-http://docs.python.org/library/urllib.html#OK�HTTP/1.1 200 OK

Hello!)rLrfrlrmr�rzrU)rr�rs&  r�test_url_fragment�#urlopen_HttpTests.test_url_fragment=sX��=���
�
�6�7�	����'�'��,�B����R�Y�Y�[�#�.��O�O���D�O�O��s�?A'�'A9c���UOQ2[OOQ2oUO	UO
2UO
2P!SO
2h9h)r�http://www.python.org)rLrfrlrmr��
will_closerU)r�resps& r�test_willclose� urlopen_HttpTests.test_willcloseGsN���
�
�6�7�	��>�>�)�)�*A�B�D��O�O�D�O�O�,��O�O���D�O�O��s�:A � A2zssl module requiredc	��[[]]!22],*FD�o[U2oQUQ0oUOQ2[	U2OQQ2o[OOoUOUQU029^tt^2[OOQU02PPP2UOUQU029^tt^2[OOQU02PPP2UO2J�	P!)%fhKn9h)%fhK99hSO2h9h)	�z//localhost:7777/test�/�HTTP/1.1 200 OK

Hello.�\�\\�contain control.*�http:�https:�r��range�chrrL�repr�replacerIrJ�
InvalidURL�assertRaisesRegexrfrlrmrU�r�char_nor�schemeless_url�escaped_char_reprr1s&     r�(test_url_path_with_control_char_rejected�:urlopen_HttpTests.test_url_path_with_control_char_rejectedOs/���E�!�T�N�+�t�f�4�4�G��w�<�D�4�T�F�!�<�N��M�M�:�;�
"�%)��J�$6�$6�t�U�$C�!�!�[�[�3�3�
��+�+��"3�4E�3F� G�I�I��N�N�*�*�U�>�2B�+C�D�I��+�+��"3�4E�3F� G�I�I��N�N�*�*�V�N�3C�+D�E�I����!�)5�I�I��I�I�����!��I�AE�#D!	�;%E� #D4	�E�!D1
�*D1
�,E�4E
�=E
�?E�Ec�.�UOQ2QoQU*Q*o[OOoUO	UQ29^tt^2[
OOQU02PPP2UO	UQ29^tt^2[
OOQU02PPP2UO2P!)%fhKg9h)%fhK59hSO2h9h)r&z:localhost:7777?a=1 HTTP/1.1
X-injected: header
TEST: 123�//�:8080/test/?test=az*contain control.*\\r.*(found at least . .)r*�contain control.*\\nr+�	rLrIrJr1r2rfrlrmrU�r�hostr5r1s&   r�4test_url_path_with_newline_header_injection_rejected�Furlopen_HttpTests.test_url_path_with_newline_header_injection_rejectedgs����
�
�6�7�O�����';�;��	����/�/�J��'�'��I�K�K����&�&��~�.>�'?�@�K��'�'�
�4K�L�L����&�&���/?�'@�A�M�
�O�O��
K�K��M�L��
�O�O���G�4D�#C�="D�#C/�D�C,	�%C,	�'D�/C?	�8C?	�:D�Dc	��[[]]!22],*FD�o[U2oQUQ0oUOQ2[	U2OQQ2o[OOoUOUQU029^tt^2[OOQU02PPP2UOUQU029^tt^2[OOQU02PPP2UO2J�	P!)%fhKn9h)%fhK99hSO2h9h)	r$z//localhostz/test/r&r'r(r)r*r+r,r3s&     r�(test_url_host_with_control_char_rejected�:urlopen_HttpTests.test_url_host_with_control_char_rejected|s#���E�!�T�N�+�t�f�4�4�G��w�<�D�*�4�&��7�N��M�M�:�;�	
"�$(��J�$6�$6�t�U�$C�!�!�[�[�3�3�
��+�+��"3�4E�3F� G�I�I��N�N�*�*�U�>�2B�+C�D�I��+�+�J�:K�L]�K^�8_�`�`��N�N�*�*�V�N�3C�+D�E�a����!�5�I�I��a�`�����!�r9c�.�UOQ2QoQU*Q*o[OOoUO	UQ29^tt^2[
OOQU02PPP2UO	UQ29^tt^2[
OOQU02PPP2UO2P!)%fhKg9h)%fhK59hSO2h9h)r&zlocalhost
X-injected: header
r;r<zcontain control.*\\rr*r=r+r>r?s&   r�4test_url_host_with_newline_header_injection_rejected�Furlopen_HttpTests.test_url_host_with_newline_header_injection_rejected�s����
�
�6�7�4�����';�;��	����/�/�J��'�'��3�5�5����&�&��~�.>�'?�@�5��'�'�
�4K�L�L����&�&���/?�'@�A�M�
�O�O��
5�5��M�L��
�O�O��rCc�*�UOQ2P!)s0.9�rr2s&r�
test_read_0_9�urlopen_HttpTests.test_read_0_9�s��	
����rc�*�UOQ2P!)s1.0rKr2s&r�
test_read_1_0�urlopen_HttpTests.test_read_1_0��������rc�*�UOQ2P!)s1.1rKr2s&r�
test_read_1_1�urlopen_HttpTests.test_read_1_1�rQrc��UOQP	Q5UO[OO29^tt^2o[O
O
Q2PPP2WOO2UO2P!)%fhK<9hSO2h9h)s�HTTP/1.1 401 Authentication Required
Date: Wed, 02 Jan 2008 03:03:54 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
Connection: close
Content-Type: text/html; charset=iso-8859-1
rPr)
rLr�rfr��	HTTPErrorrlrmr�r1rU)r�cms& r�test_read_bogus�!urlopen_HttpTests.test_read_bogus�s����
�
��
�	�	�	��"�"�6�<�<�#9�#9�:�:�b����&�&�';�<�;��L�L��� ��O�O��	;�:��
�O�O��s)�1B.� B�'"B.�B+	�$B+	�&B.�.Cc��UOQP	Q5QoUO[OOU29^tt^2o[O
O
Q2PPP2WOO2UO2P!)%fhK<9hSO2h9h)s�HTTP/1.1 302 Found
Date: Wed, 02 Jan 2008 03:03:54 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
Location: file://guidocomputer.athome.com:/python/license
Connection: close
Content-Type: text/html; charset=iso-8859-1
rPzRedirection to url 'file:r)
rLr2rfr�rVrlrmr�r1rU)r�msgrWs&  r�test_invalid_redirect�'urlopen_HttpTests.test_invalid_redirect�s����
�
���
	�	�	�-�C��'�'����(>�(>��D�D�����&�&�';�<�E��L�L��� ��O�O��	E�D��
�O�O��s)�4B1�
 B�*"B1�B.	�'B.	�)B1�1Cc	���[[OOO2FD�oUOQP	Q5UO
[OO29^tt^2o[OOQ2PPP2WOO2UO2J�	P!)%fhK@9hSO2h9h)s_HTTP/1.1 302 Found
Location: file://guidocomputer.athome.com:/python/license
Connection: close
rP�http://something)
r-rfrl�HTTPRedirectHandler�max_redirectionsrLr�r�rVrmr�r1rU)r�irWs&  r�test_redirect_limit_independent�1urlopen_HttpTests.test_redirect_limit_independent�s����v�~�~�9�9�J�J�K�A��M�M���
�
�
"��&�&�v�|�|�'=�'=�>�>�"��N�N�*�*�+=�>�?����"�"�$����!�L�?�>�����!�s*�1C#�8 C	�"C#�C 
�C 
�C#�#C5c���QQQQ-o[OOQQQUP2oUOUOQ2UOUO
Q2UOUOQ2UOUOQ2UOUOU2UOUOU2UO2P!)�
Authorizationz
Bearer foobar�Acceptzapplication/jsonr_��foo)rfr�rVr�r��coder[r��hdrsr�r1)rrk�errs&  r� test_http_error_attribute_values�2urlopen_HttpTests.test_http_error_attribute_values�s����_��(�
���l�l�$�$�%7��e�T�4�P��������'9�:�������3�'�������%�(�������U�+�������4�(�������d�+��	�	�rc���[OOQQQ-P2oUOUO[
O2UO2P!)r_rhri)rfr�rVr�rr'r(r1)rrls& r�test_http_error_default_fp�,urlopen_HttpTests.test_http_error_default_fp�s@���l�l�$�$�%7��e�R��N�����c�f�f�b�j�j�1��	�	�rc���UOQ2UO[[OO
Q2UO
2P!SO
2h9h)rr_)rLr��OSErrorrfrlrmrUr2s&r�test_empty_socket�#urlopen_HttpTests.test_empty_socket�sG��	
�
�
�c��	����g�v�~�~�'=�'=�?Q�R��O�O���D�O�O��s�/A�A'c�t�UO[OO29^tt^2o[OOQ2PPP2UO
WOO2UO
UOO2P!)%fhK\9h)z/file://localhost/a/file/which/doesnot/exists.py)
r�rfr�r�rlrmr�r�r�r��rr�s& r�test_missing_localfile�(urlopen_HttpTests.test_missing_localfile�sl��
�
�
�v�|�|�4�4�
5�
5���N�N�"�"�#T�U�6�������,�,�-�������*�*�+�6�
5��� B'�'B7	�0B7	c�$�[O2vq[OO	UP	Q5o[O
O
U2oUOQQ5O2oUO[OOU22[OOU29^tt^2oUOU2UOUOU2PPP2[O U2[O"U2UO%[OOU22UO'[O(O*29^tt^2[OOU2PPP2P!)%fhK�9h[O S2[O"S2h9h)%fhP!9h)T��
add_schemer�)�netloc)�tempfile�mkstemprfrl�pathname2urlrg�urlsplit�_replacerzr�ri�path�existsrmr�r�r1�unlinkr�r�r�r�)r�fd�tmp_file�tmp_file_canon_url�parsed�tmp_fileurl�fobjs&      r�test_file_notexists�%urlopen_HttpTests.test_file_notexists�sK���'�'�)���#�^�^�8�8��d�8�S�����&�&�'9�:���o�o�[�o�9�@�@�B��	 ��O�O�B�G�G�N�N�8�4�5����'�'��4�4������%�� � ����+=�>�5�
�H�H�R�L��I�I�h�����������1�2�
�
�
�v�|�|�4�4�
5�
5��N�N�"�"�;�/�6�
5�5�4��
�H�H�R�L��I�I�h���
5�
5�
5�s=�:AG
�.F:�=G
� G>�:G
	�G
	�G
�
.G;�>H	�H	c�x�QoUO[OO29^tt^2o[OOU2PPP2UO
WOO2UOUOO2P!)%fhK\9h)zftp:///path�r�rfr�r�rlrmr�r�r�r�r�)r�test_ftp_urlr�s&  r�test_ftp_nohost�!urlopen_HttpTests.test_ftp_nohost
sr��$��
�
�
�v�|�|�4�4�
5�
5���N�N�"�"�<�0�6�������-�-�.�������*�*�+�6�
5�s� B)�)B9	�2B9	c�t�UO[OO29^tt^2o[OOQ2PPP2UO
WOO2UOUOO2P!)%fhK\9h)z.ftp://localhost/a/file/which/doesnot/exists.pyr�rws& r�test_ftp_nonexisting�&urlopen_HttpTests.test_ftp_nonexistingsn��
�
�
�v�|�|�4�4�
5�
5���N�N�"�"�#S�T�6�������-�-�.�������*�*�+�6�
5�rzc��Qo[OOU2oUO[	U2QUQ02P!)�sixsevenz<urlopen error �>)rfr�r�r��str)rr�rls&  r�test_url_error_stringified�,urlopen_HttpTests.test_url_error_stringifieds8�����l�l�#�#�F�+������S��_�V�H�A�#>�?rr4)r5r6r7r8r�rrr!�unittest�
skipUnless�sslr7rArErHrLrOrSrXr\rcrmrprtrxr�r�r�r�r9r:rXs@rrr/s�����8�	�������3�4�"�5�"�.����3�4��5��(����3�4�"�5�"� ����3�4��5�� �
 � �
��"
"���
�,�0�",�,�@�@rrc�b`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sUsP!)�urlopen_DataTests�z"Test urlopen() opening a data URL.c��UO[OO2QUmQUmQUmQUmQUmUO[OOUO22UmUO[OOUO22UmUO[OOUO22Um
P!)utest data URLs :;,%=& ö Ä sU�PNG


IHDR{@��sRGB���IDAT�c```���?�
o/IEND�B`�zZdata:text/plain;charset=UTF-8,test%20data%20URLs%20%3A%3B%2C%25%3D%26%20%C3%B6%20%C3%84%20zPdata:text/plain;charset=ISO-8859-1;base64,dGVzdCBkYXRhIFVSTHMgOjssJT0mIPYgxCA%3Dz�data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAIAAAB7
QOjdAAAAAXNSR0IArs4c6QAAAA9JREFUCNdj%0AYGBg%2BP//PwAGAQL%2BCm8 vHgAAAABJRU5ErkJggg%3D%3D%0A%20)�
addCleanuprfrl�
urlcleanupra�image�text_url�text_url_base64�	image_urlr�rm�
text_url_resp�text_url_base64_resp�image_url_respr2s&rrp�urlopen_DataTests.setUp s���������1�1�2�;��	�
F�	
�
�
(�	
�
�
�	
��
.�	
��
"�.�.��N�N�"�"�4�=�=�1�3���$(�$5�$5��N�N�"�"�4�#7�#7�8�%:��!�"�/�/����0F�0F�t�~�~�0V�W��rc�T�QFDoUOUOU2J!	P!)r))r)r-rwr1ryrzr{r|)r}r�r~s& rr�� urlopen_DataTests.test_interface@s&��G�D����t�1�1�4�8�Grc�X�UOUOO2[OO
2UO
UOO2O2QQ,2UO
UOO2Q*[[UO222[OOQ2oUO
UO2O2QQ,2UO!2P!)�
text/plainzcontent-lengthzdata:,)r�r)�charsetz
ISO-8859-1)r�zUS-ASCII)r�r�ryr�r�r�r�r��
get_paramsr�r�rr�rfrlrmr1)r�rs& rr��urlopen_DataTests.test_infoFs������d�0�0�5�5�7����9N�9N�O�����2�2�7�7�9�D�D�F�
�!:�;�	=�����,�,�1�1�3�4D�E���D�J�J�� �	"��N�N�"�"�8�,���������,�,�.�
�!8�9�	;�	���	rc�@�UOUOO2UO2UOUOO2UO
2UOUOO2UO2P!r)r�r�rzr�r�r�r�r�r2s&rr��urlopen_DataTests.test_geturlQsp������+�+�2�2�4�d�m�m�D�����2�2�9�9�;�� � �	"�����,�,�3�3�5�t�~�~�Frc��UOUOO2O[	UOO2O
22Q*2UO2P!�r�)r�r�r)�decode�dictryr�rar2s&r�test_read_text� urlopen_DataTests.test_read_textWsZ������+�+�0�0�2�9�9���#�#�(�(�*�5�5�7�8��C�E�FJ�i�i�	Qrc��UOUOO2O[	UOO2O
22Q*2UO2P!r�)r�r�r)r�r�ryr�rar2s&r�test_read_text_base64�'urlopen_DataTests.test_read_text_base64[sY������2�2�7�7�9�@�@���*�*�/�/�1�<�<�>�?�	�J�L��I�I�	rc�p�UOUOO2UO2P!r)r�r�r)r�r2s&r�test_read_image�!urlopen_DataTests.test_read_image`s%������,�,�1�1�3�T�Z�Z�@rc�f�UO[[OOQ2P!)zdata:text/plain�r�r�rfrlrmr2s&r�test_missing_comma�$urlopen_DataTests.test_missing_commacs�����*�V�^�^�%;�%;�<M�Nrc�f�UO[[OOQ2P!)zdata:;base64,Cg=r�r2s&r�test_invalid_base64_data�*urlopen_DataTests.test_invalid_base64_datafs�����*�V�^�^�%;�%;�<N�Orc	��[2FD6oUO[[OO
QUQ02J8	[2FD6oUO[[OO
QUQ02J8	P!)zdata:text/html;z,datazdata:text/htmlz;base64,ZGF0YQ==)rr�r�rfrlrm)r�c0s& r�test_invalid_mediatype�(urlopen_DataTests.test_invalid_mediatypejsp��'�)�B����j����)?�)?� /��t�5�9�
;�*�(�)�B����j����)?�)?� .�r�d�2B�C�
E�*r)r�r�r�rar�r�r�r�)r5r6r7r8r�rpr�r�r�r�r�r�r�r�r�r9r:rXs@rr�r�sH����,�X�@9�	�G�Q��
A�O�P�E�Err�c�l`�\sQsQsnQsQsQsQsQQksQs	Qs
Q	sQ
sQs
QsQ
sQsUsP!)�urlretrieve_FileTests�rz(Test urllib.urlretrieve() on local filesc��UO[OO2,UmUO[O2QUm[[OQ2oUOUO2UO2UO2P!P!9hWO2hh9h9h)stesting urllib.urlretriever])r�rfrlr��	tempFiles�registerFileForCleanUprrcrarbrdr1)r�FILEs& rrp�urlretrieve_FileTests.setUpus���������1�1�2����	
�#�#�I�$4�$4�5�1��	�	��	�(�(�$�/�D��J�J�t�y�y�!��J�J�L�������D��������D�s1�AB8�B0�0B5�8C�9C
�	C�
C�Cc�l�UOFDo[OU2J	P!J$9hr)r�rirs)r�eachs& rrt�urlretrieve_FileTests.tearDown�s"���N�N�D����4��#���D�s�.�3c��[OOU2o[OOUP	Q5!)Tr|)rir��abspathrfrlr�)r�filePaths&&r�constructLocalFileUrl�+urlretrieve_FileTests.constructLocalFileUrl�s.���7�7�?�?�8�,���~�~�*�*�8��*�E�Erc�2�[O2vq#UOU2[OUQ2oUOU2UO
2UO
2U!S!9hWO
2hh9h9h)z�Creates a new temporary file containing the specified data,
registers the file for deletion during the test fixture tear down, and
returns the absolute path of the file.r])rr�r�ri�fdopenrdr1)rr�newFd�newFilePath�newFiles&&   r�createNewTempFile�'urlretrieve_FileTests.createNewTempFile�s}��
&�-�-�/���	��'�'��4��i�i��t�,�G��M�M�$���M�M�O��������
�D����������D�s0�A	A=�#A5�5A:�=B�>B�B�B�Bc�>�UOOU2P!r)r��append)r�fileNames&&rr��,urlretrieve_FileTests.registerFileForCleanUp�s�������h�'rc�"�[OOQ[O*2oUOU]*[O2UO
U]*[OOQ2P!)r^zFdid not get an email.message.Message instance as second returned value)
rfrl�urlretrieverrcr�r�r�r�r�)r�results& r�
test_basic� urlretrieve_FileTests.test_basic�sb�����+�+�I�	�8H�8H�,H�I��������I�$4�$4�5����f�Q�i����)>�)>�9�	:rc�X�Q[O*oUOU2[OOUO
[O2U2oUOV]*2UO[OOU2Q2[UQ2oUO2oUO2UO2UOUOU2P!K"9hSO2hh9h9h)�%s.2zcopy of the file was not made�rb)rrcr�rfrlr�r�r�r�rir�r�rbr)r1ra)r�second_tempr�r�ras&    r�	test_copy�urlretrieve_FileTests.test_copy�s����y�/�/�/���#�#�K�0����+�+�D�,F�,F����-�*�,������Q�i�0���������{�3�69�	:��K��&��	��9�9�;�D��J�J�L�����������D�)��
�D��������D�s0�; D�D	�	D
�D)�D"�!D)�"D&�$D)c��`�],1U1QkkoQ[O*oROU2[OORO
[O2V!2P!)r$c��:�ROU[2ROU[2ROU[2ROV]*2U]*]*U]$P!)r$)r�r�r�)�block_count�block_read_size�	file_size�count_holderrs&&&&�r�
hooktester�9urlretrieve_FileTests.test_reporthook.<locals>.hooktester�sW����!�!�+�s�3��!�!�/�3�7��!�!�)�S�1����[�q�/�:�*�1�o��1�L��Orr�)rrcr�rfrlr�r�)rr�r�sf  r�test_reporthook�%urlretrieve_FileTests.test_reporthook�sV���NO�S�	2��y�/�/�/���#�#�K�0����"�"��&�&�y�'7�'7�8��	%rc�*�,oU1QkoUO2o[OOUO	U2[
OU2UO[U2]2UOU]*]*]2P!)c�.�UOVU12P!r�r��r�r�r��_reports&&&&rr��Aurlretrieve_FileTests.test_reporthook_0_bytes.<locals>.hooktester�����N�N�K�)�D�Er�	r�rfrlr�r�rrcr�r�r�reportr��srcFileNames&   r�test_reporthook_0_bytes�-urlretrieve_FileTests.test_reporthook_0_bytes�st����HN�	F��,�,�.�����"�"�4�#=�#=�k�#J����j�	*�����V��a�(�������1��q�)rc�l�,oU1QkoUOQ2o[OOUO	U2[
OU2UO[U2]2UOU]*]*]2UOU]*]*]2P!)c�.�UOVU12P!rrrs&&&&rr��Aurlretrieve_FileTests.test_reporthook_5_bytes.<locals>.hooktester�rrsxxxxxrrs&   r�test_reporthook_5_bytes�-urlretrieve_FileTests.test_reporthook_5_bytes�s�����HN�	F��,�,�X�6�����"�"�4�#=�#=�k�#J����j�	*�����V��a�(�������1��q�)�������1��q�)rc��,oU1QkoUOQQ*2o[OOUO	U2[
OU2UO[U2]2UOU]*]*Q2UOU]*]*Q2UOU]*]*Q2UOU]*]*Q2P!)c�.�UOVU12P!rrrs&&&&rr��Durlretrieve_FileTests.test_reporthook_8193_bytes.<locals>.hooktester�rr�xi i rrs&   r�test_reporthook_8193_bytes�0urlretrieve_FileTests.test_reporthook_8193_bytes�s�����HN�	F��,�,�T�D�[�9�����"�"�4�#=�#=�k�#J����j�	*�����V��a�(�������1��t�,�������1��t�,�������1��t�,�������1��t�,r)r�rar%)r5r6r7r8r�rprtr�r�r�r�r�r�r
rrr9r:rXs@rr�r�rsE����2��0�F�� (�:�*�$%�	*�*�-�-rr�c�2`�\sQsQsnQsQsQsQsUsP!)�urlretrieve_HttpTests�z5Test urllib.urlretrieve() using fake http connectionsc���UO[OO2UO	Q2QoUO[OO29^tt^2[OO[OUQ5UO2PPP2P!SO2h9h)%fhP!9h)��HTTP/1.1 200 OK
Date: Wed, 02 Jan 2008 03:03:54 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
Connection: close
Content-Length: 100
Content-Type: text/html; charset=iso-8859-1

FF
c��P!rr4)�par1�par2�par3s&&&r�_reporthook�Yurlretrieve_HttpTests.test_short_content_raises_ContentTooShortError.<locals>._reporthook
s��r)�
reporthook�r�rfrlr�rLr�r��ContentTooShortErrorr�r�
TEST_HTTP_URLrU)rr s& r�.test_short_content_raises_ContentTooShortError�Durlretrieve_HttpTests.test_short_content_raises_ContentTooShortErrors���������1�1�2��
�
��	�	��
�
�v�|�|�@�@�
A�
A�
"����*�*�7�+@�+@�6A�+�C����!�B�
A��
���!��B�
A�
A�s*�0C�2/B<�!C�<C�C�C"	�C"	c��UO[OO2UO	Q2UO[OO29^tt^2[OO[O2UO2PPP2P!SO2h9h)%fhP!9h)rr#r2s&r�Atest_short_content_raises_ContentTooShortError_without_reporthook�Wurlretrieve_HttpTests.test_short_content_raises_ContentTooShortError_without_reporthooks���������1�1�2��
�
��	��
�
�v�|�|�@�@�
A�
A�
"����*�*�7�+@�+@�A����!�	B�
A�����!��	B�
A�
A�s*�-C�/-B7�C�7C	�	C�C	�C	r4)	r5r6r7r8r�r&r)r9r:rXs@rrr�s����?�"�."�"rrc�\`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsUsP!)
�QuotingTests�*a)Tests for urllib.quote() and urllib.quote_plus()

According to RFC 3986 (Uniform Resource Identifiers), to escape a
character you write it as '%' + <2 character US-ASCII hex value>.
The Python code of ``'%' + hex(ord(<character>))[2:]`` escapes a
character properly. Case does not matter on the hex letters.

The various character sets specified are:

Reserved characters : ";/?:@&=+$,"
    Have special meaning in URIs and must be escaped if not being used for
    their special meaning
Data characters : letters, digits, and "-_.!~*'()"
    Unreserved and do not need to be escaped; can be, though, if desired
Control characters : 0x00 - 0x1F, 0x7F
    Have no use in URIs so must be escaped
space : 0x20
    Must be escaped
Delimiters : '<>#%"'
    Must be escaped
Unwise : "{}|\^[]`"
    Must be escaped

c��PO,QN2o[OOU2oUO	VQU8QU802[OOU2oUO	VQU8QU802P!)r�using quote(): � != �using quote_plus(): )�ABCDEFGHIJKLMNOPQRSTUVWXYZ�abcdefghijklmnopqrstuvwxyz�
0123456789z_.-~)�joinrfrgrhr��
quote_plus)r�do_not_quoter�s&  r�test_never_quote�QuotingTests.test_never_quoteDsu���x�x�!)�*�����#�#�L�1������v�6B�F�K�	M����(�(��6������v�:F��O�	Qrc�~�UO[OOO]*Q2P!)r$r%)r�rfrgrh�__defaults__r2s&r�test_default_safe�QuotingTests.test_default_safeQs'��������+�+�8�8��;�S�Arc���Qo[OOVQ5oUOVQU8QU802[OO	UUQ5oUOVQU8QU802[OOUQQ5oUOVQU8QU802[OOQQQQ	5o[OOQQPQ	5oUOV2QU8QU802[OOQQQ
Q	5o[OOQQPQ	5oUOV2QU8QU802P!)z<>��safer/r0r1s<>uaüb�latin-1�ü)�encodingr@��)rfrgrhr�r6)r�quote_by_defaultr��expects&   r�	test_safe�QuotingTests.test_safeUsY�������#�#�$4�#�L�����)�6�6F��O�	Q����(�(�)9�.>�)�@�����)�6�*�F�4�	5����#�#�$4�5�#�A�����)�6�6F��O�	Q����#�#�H�y�v�#�N�����#�#�H�y�r�#�J������� �&�*�	+����#�#�H�y�w�#�O�����#�#�H�y�r�#�J������� �&�*�	+rc��[] 2Tt,tFDo[U2MJ	ooUOQ2UO[]22POU2oSFD�o[O
O
U2oUO[U2UQU8Q[U28QU802[O
OU2oUO[U2UQU8Q[U28QU802J�	=QoQo[O
O
U2oUOVdQU8Q	U802[O
OU2oUOVdQU8Q	U802P!ttoh)
� z
<>#%"{}|\^[]`r/z should be escaped to z, not r1z should be escapes to zab[]cdz
ab%5B%5Dcdr0)
r-r.r�r5rfrgrhr�rr6)r�num�should_quoterr��
partial_quote�expecteds&      r�test_default_quoting�!QuotingTests.test_default_quotingrsE��-2�"�I�6�I�S��C��I��6����,�-����C��H�%��w�w�|�,�� �D��\�\�'�'��-�F����Y�t�_�f�#�I�d�O�V�=�
>��\�\�,�,�T�2�F����Y�t�_�f�#�I�d�O�V�=�
>�!�
� �
������#�#�M�2������6�6>��G�	I����(�(��7������6�;C�V�L�	N��-7s�Fc
�T�[OOQ2oUOU[	Q2QU8Q[	Q2802[OOQ2oUOUQQU*2QoUO
Q[	Q22o[OOU2oUOV1QU8QU802UO
QQ2o[OOU2oUOV1QU8QU802P!)� r/r0�+zusing quote_plus(): %r != +z
a b cd e fr1)rfrgrhr�rr6r0)rr��givenrFs&   r�test_quoting_space�QuotingTests.test_quoting_space�s������#�#�C�(�������3��6<�i��n�M�	O����(�(��-�������6��?�	A������s�I�c�N�3�����#�#�E�*�������6<�f�E�	G����s�C�(�����(�(��/�������;A�6�J�	Lrc��UO[OOQ2Q2UO[OOQQ2Q2UO[OOQ2Q2UO[OOQQ2Q2P!)zalpha+beta gammazalpha%2Bbeta+gammarSzalpha+beta+gammasalpha+beta gamma�+)r�rfrgr6r2s&r�test_quoting_plus�QuotingTests.test_quoting_plus�s���������0�0�1C�D�-�	/�������0�0�1C�S�I�+�	-�	
������0�0�1D�E�-�	/�	
������0�0�1C�T�J�+�	-rc�V�QoQo[OOU2oUOV#QU8QU802UO	[
[OOUQQ5[OO
U2oUOV#QU8QU802P!)���ab��%A2%D8ab%FFr/r0rA�rCzusing quote_from_bytes(): )rfrgrhr�r��	TypeError�quote_from_bytes�rrTrFr�s&   r�test_quote_bytes�QuotingTests.test_quote_bytes�s���!�������#�#�E�*�������6<�f�E�	G�	
���)�V�\�\�%7�%7��%.�	�	0����.�.�u�5�������"�F�,�	-rc�X�QoQo[OOU2oUOV#QU8QU802[OOUPPQ5oUOV#QU8QU802QoQo[OOUQQ5oUOV#QU8QU802QoQ	o[OOU2oUOV#QU8QU802QoUO	[
[OOUQQ5QoQ
o[OOUQQQ5oUOV#QU8QU802QoQo[OOUQQ
Q5oUOV#QU8QU802P!)u¢Øabÿz%C2%A2%C3%98ab%C3%BFr/r0�rC�errorsr]rAr^�漢字�%E6%BC%A2%E5%AD%97z%3F%3Fr0z%26%2328450%3B%26%2323383%3B�xmlcharrefreplace)rfrgrhr�r��UnicodeEncodeErrorras&   r�test_quote_with_unicode�$QuotingTests.test_quote_with_unicode�s��� ��'�����#�#�E�*�������6<�f�E�	G����#�#�E�D��#�F�������6<�f�E�	G�!�������#�#�E�I�#�>�������6<�f�E�	G���%�����#�#�E�*�������6<�f�E�	G������,�f�l�l�.@�.@�%�-6�	�	8��������#�#�E�I�+4�$�6�������6<�f�E�	G���/�����#�#�E�I�+>�$�@�������6<�f�E�	Grc��QoQo[OOUQQ5oUOV#QU8QU802QoQo[OOUQQQ	5oUOV#QU8QU802P!)
u¢Ø ÿz
%A2%D8+%FFrAr^r1r0uab漢字 cdzab%3F%3F+cdr0re)rfrgr6r�ras&   r�test_quote_plus_with_unicode�)QuotingTests.test_quote_plus_with_unicode�s����������(�(���(�C�������;A�6�J�	L�$�������(�(���09�)�;�������;A�6�J�	Lrr4)r5r6r7r8r�r8r<rGrOrUrYrbrkrnr9r:rXs@rr,r,*sD�����2Q�B�+�:N�8L�&
-�-� (G�T
L�
Lrr,c�\`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsUsP!)
�UnquotingTests�zoTests for unquote() and unquote_plus()

See the doc string for quoting_Tests for details on quoting and such.

c
�*�,o[]�2FD�o[[U22o[U2o[OOU2oUO
VEQU8QU802[OOU2oUO
VEQU8QU802UOU2J�	POU2o=[OOU2oUO
UOQ2]QU*2P!)��using unquote(): r0�using unquote_plus(): rz/using unquote(): not all characters escaped: %s)r-rr.rfrg�unquoter��unquote_plusr�r5�count)r�escape_listrKrTrFr��
escape_strings&      r�test_unquoting�UnquotingTests.test_unquoting�s�������:�C��c�#�h�'�E���X�F��\�\�)�)�%�0�F����V�V�<B�F�K�
M��\�\�.�.�u�5�F����V�V�$�f�.�
/�
���u�%������,�
�����%�%�m�4��������c�*�A�� &�'�	(rc���UO[[1[OO
P2UO[[1[OO
Q2P!)Nr4)r�r_�AttributeErrorrfrgrwr2s&r�#test_unquote_rejects_none_and_tuple�2UnquotingTests.test_unquote_rejects_none_and_tuplesD�����9�n�5�v�|�|�7K�7K�T�R����9�n�5�v�|�|�7K�7K�R�Prc���QoSo[OOU2oUOV#QU8QU802QoSo[OOU2oUOV#QU8QU802QoSo[OOU2oUOV#QU8QU802Qo[	UQ2o[OOU2oUOV#QU8QU802Qo[	UQ2o[OOU2oUOV#QU8QU802Qo[	UQ2o[OOU2oUOV#QU8QU802UO
[[1[OO
P2UO
[[1[OO
Q2P!)z%xabrur0z%xrr\�using unquote_to_bytes(): r4)	rfrgrwr�r_�unquote_to_bytesr�r_rras&   r�test_unquoting_badpercent�(UnquotingTests.test_unquoting_badpercents����������%�%�e�,�������"�F�*,�	-��������%�%�e�,�������"�F�*,�	-��������%�%�e�,�������"�F�*,�	-����u�g�&�����.�.�u�5�������"�F�*,�	-����u�g�&�����.�.�u�5�������"�F�*,�	-����u�g�&�����.�.�u�5�������"�F�*,�	-����9�n�5�v�|�|�7T�7T�VZ�[����9�n�5�v�|�|�7T�7T�VX�Yrc��QoQo[OOU2oUOV#QU8QU802P!)z%Ab%eAs��r�r0�rfrgr�r�ras&   r�test_unquoting_mixed_case�(UnquotingTests.test_unquoting_mixed_case;s<���������.�.�u�5�������"�F�,�	-rc��Q[Q2*oQo[OOU2oUO	V#QU8QU802[OOU2oUO	V#QU8QU802P!)zab%sd�c�abcdr/r0rv)rrfrgrwr�rxras&   r�test_unquoting_parts�#UnquotingTests.test_unquoting_partsDsu���)�C�.�(�������%�%�e�,�������6<�f�E�	G����*�*�5�1�������=C�V�L�	Nrc��QoSo[OOU2oUOV#QU8QU802UO	QQ2o[OOU2oUOV#QU8QU802P!)zare+there+spaces...rur0rSrRrv)rfrgrwr�r0rxras&   r�test_unquoting_plus�"UnquotingTests.test_unquoting_plusPsz��%�������%�%�e�,�������8>��G�	I����s�C�(�����*�*�5�1�������=C�V�L�	Nrc���QoQo[OOU2oUOV#QU8QU802[OOQ2oQoUOV#QU8QU802QoQo[OOU2oUOV#QU8QU802QoQo[OOU2oUOV#QU8QU802P!)	�"br%C3%BCckner_sapporo_20050930.docsbrückner_sapporo_20050930.docr�r0�	漢%C3%BCs漢üs%A2%D8ab%FFr\s	%A2�ab%FFr�ras&   r�test_unquote_to_bytes�$UnquotingTests.test_unquote_to_bytes\s���4��8�����.�.�u�5�������"�F�,�	-����.�.�~�>��(�������"�F�,�	-���"�����.�.�u�5�������"�F�,�	-�
 ��"�����.�.�u�5�������"�F�,�	-rc�L�QoQo[OOU2oUOV#QU8QU802[OOUPPQ5oUOV#QU8QU802[OOQQQ5oQoUOV#QU8QU802QoQ	o[OOU2oUOV#QU8QU802Q
oQo[OOU2oUOV#QU8QU802[OOUQQ
5oUOV#QU8QU802Q
oPo[OOUQQ
5oUOV#QU8QU802[OOQ2oQoUOV#QU8QU802[OOQQQ5oQoUOV#QU8QU802P!)r�ubrückner_sapporo_20050930.docrur0rezbr%FCckner_sapporo_20050930.docrAr^rhrgz%F3%B1u�r0)rf�ignorer�u漢üu漢%FC�rfrgrwr�ras&   r�test_unquote_with_unicode�(UnquotingTests.test_unquote_with_unicode{s��4��5�����%�%�e�,�������8>��G�	I����%�%�e�d�4�%�H�������8>��G�	I����%�%�&G�/8�&�:��5�������8>��G�	I�%�������%�%�e�,�������8>��G�	I��������%�%�e�,�������8>��G�	I����%�%�e�I�%�>�������8>��G�	I��������%�%�e�H�%�=�������8>��G�	I����%�%�n�5���������8>��G�	I�
���%�%�k�I�%�F���������8>��G�	Irc�v�QoQo[OOU2oUOV#QU8QU802QoQo[OOU2oUOV#QU8QU802QoQo[OOU2oUOV#QU8QU802P!)sblueberryjam�blueberryjamrur0sblåbærsyltetøyublåbærsyltetøysbl%c3%a5b%c3%a6rsyltet%c3%b8jublåbærsyltetøjr�ras&   r�test_unquoting_with_bytes_input�.UnquotingTests.test_unquoting_with_bytes_input�s����������%�%�e�,�������8>��G�	I�7��0�����%�%�e�,�������8>��G�	I�1��0�����%�%�e�,�������8>��G�	Irr4)r5r6r7r8r�r|r�r�r�r�r�r�r�r�r9r:rXs@rrqrq�sE�����(�*Q�"Z�H-�
N�
N�-�>8I�tI�Irrqc�n`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsUsP!)�urlencode_Testsi�zTests for urlencode()c�P�,Q	No[OOU2oSFD!oUOVTQU8QU8QU802J#	UO	UOQ2]QU8QUOQ2802UO
Q2oVF]*
*oVF]**oSOUO29%cUO2QU8QU802UO	[U2]QU8Q[U28Q]802P!)
z�Helper method for testing different input types.

'given' must lead to only the pairs:
    * 1st, 1
    * 2nd, 2
    * 3rd, 3

Test cannot assume anything about order.  Docs make no guarantee and
have possible dictionary input.

ztesting z: z not found in �&z: expected 2 '&'s; got z%: '&' not located in proper place in z#: unexpected number of characters: r0)z1st=1z2nd=2z3rd=3)
rfrg�	urlencode�assertInr�ry�indexr��isdigitr)	rrT�	test_type�expect_somewherer�rN�amp_location�on_amp_left�on_amp_rights	&&&      r�help_inputtype�urlencode_Tests.help_inputtype�s���7�����'�'��.��(�H��M�M�(�F�#�X�v�7�
8�)�	
������c�*�A�#�V�\�\�#�%6�8�	9��|�|�C�(���A�-�.���Q�.�/������+�+�-�H�H�,�2F�2F�2H����)�	*�	
����V��k�$�S��[�+�?�	@rc�8�UOQQQQQQ-Q2P!)�1st�1�2nd�2�3rd�3zusing dict as input type�r�r2s&r�test_using_mapping�"urlencode_Tests.test_using_mapping�s"�����U�3��c�5��=�6�	8rc�0�UO,QNQ2P!)r�z*using sequence of two-item tuples as input))r�r�)r�r�)r�r�r�r2s&r�test_using_sequence�#urlencode_Tests.test_using_sequence�s�����F�H�	Jrc��QQ-o[Q28Q[Q280o[OOU2oUO	V#2QQ-oQo[OOU2oUO	V#2P!)r��=zkey namezA bunch of pluseszkey+name=A+bunch+of+pluses)rrfrgr�r�ras&   r�test_quoting�urlencode_Tests.test_quoting�sq���S�	��%�c�N�I�c�N�;�����'�'��.������(��/�0��-�����'�'��.������(rc���Q,QN-oQ[OO[,QN22*o[OO	U2oUOV#2[OO	UP	2oUQ*FDoQU*oUO
V#2J	UOUOQ2]QUOQ2*2P!)�sequencezsequence=%sr�zExpected 2 '&'s, got %s)r�r�r�)rfrgr6r�r�r�r�ry)rrTrFr��values&    r�
test_doseq�urlencode_Tests.test_doseqs����O�,������!8�!8��_�9M�!N�N�����'�'��.������(����'�'��t�4���:�&�&�E�"�U�*�F��M�M�&�)�'�	
������c�*�A�2�V�\�\�#�5F�F�	Hrc���UOP[OO-22UOP[OO,22P!)r�r�rfrgr�r2s&r�test_empty_sequence�#urlencode_Tests.test_empty_sequences@������V�\�\�3�3�B�7�8�����V�\�\�3�3�B�7�8rc���UOQ[OOQ]-22UOQ[OOQP-22P!)za=1�aza=Noner�r2s&r�test_nonstring_values�%urlencode_Tests.test_nonstring_valuessH��������� 6� 6��Q�x� @�A�����6�<�<�#9�#9�3��+�#F�Grc�l�UOQ[OOQ]],-P	22UOQ[OOQPQ,-P	22[O
QQ,2oUOQ[OOQU-P	22P!)za=1&a=2r�z
a=None&a=aza=a&a=b)r�r)�br)r�rfrgr�rr)rrs& r�test_nonstring_seq_values�)urlencode_Tests.test_nonstring_seq_valuess�������F�L�L�$:�$:�C�!�Q��=�$�$O�P��������/�/��t�S�k�0B�D�I�	K��&�&��(�';�<���������/�/��d��T�B�	Drc�J�Q	oQo[OOUQQQ5oUOV#2Q	oQo[OOU2oUOV#2Q	oQo[OOUQQ5oUOV#2P!)
� �%3F=%3F�ASCIIr0re�
%C2%A0=%C3%81�%A0=%C1rAr^�)r��Á�rfrgr�r�ras&   r�test_urlencode_encoding�'urlencode_Tests.test_urlencode_encoding!s���'�������'�'���	�'�R������(�(�� �����'�'��.������(�(�������'�'��	�'�B������(rc��Q
oQo[OOUP	QQQ5oUOV#2QoQo[OOUP	QQQ5oUOV#2Q
oQo[OOUP	2oUOV#2QoQo[OOUP	2oUOV#2Q
oQ	o[OOUP	Q
Q5oUOV#2QoQo[OOUP	Q
Q5oUOV#2P!)r�r�r�r0)�doseqrCrfz
%3F=1&%3F=%3Frer�z%C2%A0=42&%C2%A0=%C3%81r�rAr^z%A0=42&%A0=%C1r�))r�)rr�))r�)�*r�r�ras&   r�test_urlencode_encoding_doseq�-urlencode_Tests.test_urlencode_encoding_doseq4s@��'�������'�'��T�18��(�L������(�-�� �����'�'��t�18��(�L������(�(�� �����'�'��t�4������(�-��*�����'�'��t�4������(�(�������'�'��t�i�'�H������(�-��!�����'�'��t�i�'�H������(rc�<�QoQo[OOU2oUOV#2[OOUP	2oUOV#2QoQo[OOUP	2oUOV#2P!)��$z
%A0%24=%C1%24z%A0%24=42&%A0%24=%C1%24�)r���$))r�)r�r�r�ras&   r�test_urlencode_bytes�$urlencode_Tests.test_urlencode_bytesYs���-�� �����'�'��.������(����'�'��t�4������(�4��*�����'�'��t�4������(rc�|�Q	o[OOUQQ5oQoUOV22Q	o[OOUP	QQ5oQoUOV22Q
oQo[OOUP	QQ5oUOV22Q	o[OOUQQQ5oQoUOV22Q	oQo[OOUP	QQQ5oQ
oQo[OOUP	QQQ5oUOV22P!)r�z:$r?z	%A0$=%C1$)r�r@z%A0$=%C1$&%A0$=13&%A0$=42rA)r@rC)r�r@rCr�))r�)r��
r�r�)rrTr�rFs&   r�&test_urlencode_encoding_safe_parameter�6urlencode_Tests.test_urlencode_encoding_safe_parametergs?��
.�����'�'��D�'�9��������(�-�����'�'��T��'�E��������(�9��,�����'�'��t�$�'�?������(�.�����'�'��D�1:�(�<��������(�-�������'�'��T��1:�(�<��9��,�����'�'��t�$�1:�(�<������(rr4)r5r6r7r8r�r�r�r�r�r�r�r�r�r�r�r�r�r9r:rXs@rr�r��sP�����@�@8�
J�
	)�H�9�H�D�)�&#)�J)�&)�&)rr�c�R`�\sQsQsnQsQsQsQsQs\	O\OQ6HQ2Q	2s
\	O\OQ6HQ
2Q2s\	O\O"Q2Q
2sQsQsQs\	O\O.Q2Q2s\	O\OQ6HQ2Q2s\	O\OQ6HQ
2Q2s\	O\O"Q2Q2sQsUsP!)�Pathname_Testsi�z&Test pathname2url() and url2pathname()c�4�[OOQQQQ2oQo[OOU2oUO
V#QU8QU802[OOU2oUO
VQU8QU802P!)�parts�ofr�r�zparts/of/a/path�pathname2url() failed; r0zurl2pathame() failed; )rir�r5rfrlr�r��url2pathname)r�
expected_path�expected_urlr�s&   rr��Pathname_Tests.test_basic�s��������W�d�C��@�
�(�����,�,�]�;������v� �,�0�	1����,�,�\�:������� �-�1�	2rc�2�[OOQQQ2oQ[OOQ2*o[OOU2oUOV#QU8QU802So[OOU2oUOV#QU8QU802[OOQQ2oQ	[OOQ2*o[OOU2oUOV#QU8QU802Q
o[OOQQ2o[OOU2oUOV#QU8QU802P!)
�needszquot=ing�herez
needs/%s/herer�r0zurl2pathname() failed; z	make sure�using_quotez%s/using_quotezmake+sure/using_unquotez	make+sure�
using_unquote)
rir�r5rfrgrhrlr�r�r�ras&   rr��Pathname_Tests.test_quoting�sD�������W�j�&�9�� �6�<�<�#5�#5�j�#A�A�����,�,�U�3������� �&�*�	+������,�,�V�4������� �&�*�	+������[�-�8��!�F�L�L�$6�$6�{�$C�C�����,�,�U�3������� �&�*�	+�*�������k�?�;�����,�,�U�3������� �&�*�	+rc��[OOo[OO
oUO
UP2P2UO
UU2Q2UO
UQ2Q2UO
UQUQ02Q2UO
UUQUQ02Q2UO
UUQUQ02Q2P!)r�///r��b.cza/b.c�///a/b.c�b%#cz
///a/b%25%23c)rfrlr�rir��sepr��r�fnrs&  r�test_pathname2url� Pathname_Tests.test_pathname2url�s���
�^�^�
(�
(���g�g�k�k������B���$�����C��%�(�����C��#�&�����a��u�C�L�)�7�3�����s�e�1�S�E��-�.�
�;�����s�e�1�S�E��.�/��Arc�d�[OOoQ
UQ1QQUQ0Q1UQUQ0Q1UQUQ0Q1,oSFDYvq4UOUQ59^tt^2UO	[
OOUP	Q	5U2PPP2J[	P!)%fhJp9h)r�file:///r�r�z
file:a/b.cz
file:///a/b.crzfile:///a/b%25%23c)r�r|)rr�)r�zfile:a)rir�r�subTestr�rfrlr�)rr�subtestsr�r�s&    r�test_pathname2url_add_scheme�+Pathname_Tests.test_pathname2url_add_scheme�s����g�g�k�k���
�*������S�\�<�(��u�A�c�U�#�
��0��u�A�c�U�$�
�!5�6�

��#+��D����4��(�(�� � ��N�N�/�/���/�F��V�)�(�#+�(�(�(�s�2B	�B/
�'B/
�win32z#test specific to Windows pathnames.c	��[OOoUOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q	2UOUQ
2Q2UOUQ2Q
2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q 2UOUQ!2Q"2UOUQ#2Q$2UOUQ%2Q2UOUQ"2Q"2UOUQ&2Q2UOUQ'2Q2,Q(NoSFD8oUOU[OO	U22U2J:	P!))z
\\?\C:\dirz	///C:/dirz\\?\unc\server\share\dirz//server/share/dir�C:�///C:�C:\�///C:/zc:\a\b.cz///c:/a/b.czC:\a\b.cz///C:/a/b.cz	C:\a\b.c\z///C:/a/b.c/z	C:\a\\b.cz///C:/a//b.cz	C:\a\b%#cz///C:/a/b%25%23cuC:\a\béz///C:/a/b%C3%A9�C:\foo\bar\spam.foo�///C:/foo/bar/spam.fooz
C:\foo:barz///C:/foo%3Abarzfoo:barz	foo%3Abarz
\folder\test\�///folder/test/z\\folder\test\z//folder/test/z\\\folder\test\z
\\some\share\z
//some/share/z\\some\share\a\b.cz//some/share/a/b.cu\\some\share\a\b%#céz//some/share/a/b%25%23c%C3%A9zC:/a/b.cz
//?/C:/dirz//?/unc/server/share/dir)rrr)rfrlr�r�r�)rr�urlsr�s&   r�test_pathname2url_win�$Pathname_Tests.test_pathname2url_win�s@���^�^�
(�
(������,�-�{�;�����<�=�?S�T�����D��7�+�����F��X�.�����L�)�=�9�����L�)�=�9�����N�+�^�<�����N�+�^�<�����M�*�,>�?�����N�+�->�?�����4�5�7O�P�����M�*�,=�>�����I���4�����.�/�1B�C�����0�1�3C�D�����2�3�5F�G�����/�0�/�B�����5�6�8L�M�����:�;�=\�]�����J���7�����0�1�3G�H�����L�)�;�7�����6�7�9M�N�*���C����R���� ;� ;�C� @�A�3�G�rz test specific to POSIX pathnamesc���[OOoUOUQ2Q2UOUQ2Q2UOUQ2Q2P!)z//a/b.cz	////a/b.cr�z
/////a/b.cz//////a/b.c)rfrlr�r��rrs& r�test_pathname2url_posix�&Pathname_Tests.test_pathname2url_posix�sO���^�^�
(�
(������I���4�����J���6�����K��-�8rzneed os_helper.FS_NONASCIIc�4�[O2o[O2o[OO[OVQ5oUO[OO[O2U2P!�re)�sys�getfilesystemencoding�getfilesystemencodeerrorsrfrgrhr�FS_NONASCIIr�rlr��rrCrfr�s&   r�test_pathname2url_nonascii�)Pathname_Tests.test_pathname2url_nonasciisb���,�,�.���.�.�0���l�l� � ��!6�!6�� �Y��������4�4�Y�5J�5J�K�S�Qrc��[OOo[OO
oUO
UP2P2UO
UQ2U2UO
UQ2U2UO
UQ2UU02UO
UQ2Q2UO
UQ2QUQ02UO
UQ2UQUQ02UO
UQ2UQUQ02UO
UQ	2UQUQ02UO
UQ
2UUQUQ02UO
UQ2Q2UO
UQ2Q
UUQ02UO
UQ2Q2UO
UQ2Q2UO
UQ2Q2UO
UQ2Q2UO
UQ2Q2UO
UQ2Q2UO
UQ2Q2UO
UQ2Q2P!)rr%r�z////rizfoo/bar�bar�/foo/barz//localhost/foo/barz
///foo/barz////foo/bar�	data:blahzdata://blah�data:�blahzfoo?barzfoo#barzfoo?bar=bazzfoo?bar#bazz	foo%3Fbarz	foo%23barzfoo%3Fbar%3Dbazzfoo%3Fbar%23baz)rfrlr�rir�rr�rs&  r�test_url2pathname� Pathname_Tests.test_url2pathname	s��
�^�^�
(�
(���g�g�k�k������B���$�����C��S�E�+�����E��s�e�-�����F���u�S�E�]�3�����E��E�*�����I��#�c�U�#��7�����J��C�5��C�5��)<�=�����1�2�s�e�3�s�e�3�4G�H�����L�)�c�U�#�c�U�#�+>�?�����M�*�s�e�C�5��C�5��,D�E�����K��+�6�����M�*�e�C�5���T�,B�C�����I���.�����I���.�����M�*�E�2�����M�*�E�2�����K��)�4�����K��)�4�����-�.�
�>�����-�.�
�>rc��[OOoQQQQU1QU1QUU01QQQUQ01QUQUQ01QUQUQ01Q	UQUQ01Q
UUQUQ01QQQUUQ
01,oSFDYvq4UOUQ59^tt^2UO	[
OOUP	Q5U2PPP2J[	P!)%fhJp9h)r�zfile:/rz	file:////rizfile:foo/barr&z
file:/foo/barzfile://localhost/foo/barzfile:///foo/barzfile:////foo/barzfile:data://blahr)r*�r���require_scheme)r�r)zFILE:r)zFiLe:r)zfile:foori)zfile:data:blahr()rir�rrr�rfrlr�)rrr	r�r�s&    r� test_url2pathname_require_scheme�/Pathname_Tests.test_url2pathname_require_scheme"s ���g�g�k�k�����
�#�� �
�C�5�"�
�S�E�#��-�(��
�s�3�%�s�^�,�
���S���S�1�2�
'�C�5��C�5��)<�=�
�3�%�s�3�%�s� 3�4�
�C�5���S���S�!9�:�+�
�5���c�U�$�!7�8�
�� #+��C����#��&�&�� � ��N�N�/�/��D�/�I�!�#�'�&�#+�&�&�&�s�
2C
	�
C
�C
c��,QNoSFDkoUOUQ59^tt^2UO[OO[O
OUP	Q5PPP2Jm	P!)%fhJ�9h)rr.r/)r�:rizhttp:fooz
localfile:foozdata:fooz
data:file:foozdata:file://foo)rr�rfr�r�rlr�)rr	r�s&  r�'test_url2pathname_require_scheme_errors�6Pathname_Tests.test_url2pathname_require_scheme_errors:sj��	
���C����#��&�&��!�!��L�L�)�)��N�N�/�/���"�.�'�&��&�&�&�s�AA:	�:B
�B
zAFixed by https://github.com/emscripten-core/emscripten/pull/24593c��[OOo[OO
oUO
UQP	Q5UQUQ02UO
UQ[O2Q02UQUQ02UO
UQ[O2Q0P	Q5UQUQ02P!)�//127.0.0.1/foo/bar)�resolve_hostrir&r;r')	rfrlr�rir�rr��socket�gethostnamers&  r�test_url2pathname_resolve_host�-Pathname_Tests.test_url2pathname_resolve_hostLs���
�^�^�
(�
(���g�g�k�k������1��E�#��c�RU�QV�VY�GZ�[�����b��!3�!3�!5� 6�h�?�@�S�E��S�E�QT�BU�V�����b��!3�!3�!5� 6�h�?�d�S�X[�W\�\_�`c�_d�dg�Uh�irc	���[OOoUOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ	2Q2UOUQ
2Q2UOUQ2Q2UOUQ
2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ2Q2UOUQ 2Q!2UOUQ"2Q#2UOUQ$2Q%2UOUQ&2Q'2UOUQ(2Q'2UOUQ)2Q'2UOUQ*2Q+2UOUQ,2Q2UOUQ-2Q2UOUQ.2Q/2UOUQ02Q'2UOUQ12Q22UOUQ32Q42,Q5NoSFD8oUOU[OO	U22U2J:	P!)6z/C:/rz//C:rz//C:/z//C:\z//C:80/zC:80\z///C|rrz/C|//zC:\\z
///C|/pathzC:\pathz
///C/test/z\C\test\z////C/test/z	\\C\test\zc:/path/to/filezc:\path\to\filezC:/path/to/filezC:\path\to\filezC:/path/to/file/zC:\path\to\file\zC:/path/to//filezC:\path\to\\filezC|/path/to/filez/C|/path/to/filez///C|/path/to/filez///C|/foo/bar/spam.fooru///è|/uè:\z//host/share/spam.txt:eggsz\\host\share\spam.txt:eggsz///c:/spam.txt:eggszc:\spam.txt:eggsz//server/path/to/filez\\server\path\to\filez////server/path/to/filez/////server/path/to/filez//127.0.0.1/path/to/filez\\127.0.0.1\path\to\filez//localhost/C:/path/to/filez//localhost/C|/path/to/filez//localhost/path/to/filez
\path\to\filez //localhost//server/path/to/filezC:/foo%2fbarz
C:\foo/barz//server/share/foo%2fbarz\\server\share\foo/bar)rz	\C\test\\r)rfrlr�r�r�)rr�pathsr�s&   r�test_url2pathname_win�$Pathname_Tests.test_url2pathname_winTs���^�^�
(�
(������F��V�,�����F��T�*�����G��f�-�����H��v�.�����I���1�����G��d�+�����G��d�+�����H��v�.�����G��h�/�����L�)�:�6�����L�)�=�9�����M�*�O�<�����-�.�0D�E�����-�.�0D�E�����.�/�1G�H�����.�/�1G�H�����-�.�0D�E�����.�/�1E�F�����0�1�3G�H�����4�5�7O�P�����M�*�K�8�����8�9�;[�\�����1�2�4G�H�����3�4�6R�S�����5�6�8T�U�����6�7�9U�V�����6�7�9X�Y�����9�:�<P�Q�����9�:�<P�Q�����6�7�9K�L�����>�?�A]�^�����N�+�]�;�����6�7�9U�V�)���D����R���� ;� ;�D� A�B�D�I�rc�@�[OOoUO[OO
UQ2UO[OO
UQ2UO[OO
UQ2UO[OO
UQ2UO[OO
UQ2UO[OO
UQ2P!)z	//foo/barz//localhost:/foo/barz
//:80/foo/barz//:/foo/barz//c:80/foo/barr8)rfrlr�r�r�r�rs& r�test_url2pathname_posix�&Pathname_Tests.test_url2pathname_posix�s����^�^�
(�
(�����&�,�,�/�/��[�A����&�,�,�/�/��5K�L����&�,�,�/�/��_�E����&�,�,�/�/��]�C����&�,�,�/�/��5E�F����&�,�,�/�/��5J�Krc��[O2o[O2o[OoUO[OOU2[O2[OOV1UQ5oUO[OOU2[O2P!r)rrr rr!r�rfrlr�rgrhr"s&   r�test_url2pathname_nonascii�)Pathname_Tests.test_url2pathname_nonascii�s����,�,�.���.�.�0���#�#��������4�4�S�9�9�;P�;P�Q��l�l� � ��� �G��������4�4�S�9�9�;P�;P�Qrr4)r5r6r7r8r�r�r�rr
r�r�r�platformr�skipIfrrr!r#r+r1r5r�
is_emscriptenr<r@rCrFr9r:rXs@rr�r��sh����0�2�+�6	B�
V��������0�>�@�"H�@�"H�H�_�_�S�\�\�W�,�7�9�9�9�9�����.�.�0L�M�R�N�R�?�2#�0.�$�_�_�W�*�*�,o�p�j�q�j��������0�>�@�.J�@�.J�`�_�_�S�\�\�W�,�7�9�L�9�L�����.�.�0L�M�R�N�Rrr�c�,`�\sQsQsnQsQsQsUsP!)�
Utility_Testsi�z=Testcase to test the various utility functions in the urllib.c�l�UO[OO2[2P!)zATest the urllib.request.thishost utility function returns a tuple)r�rfrl�thishost�tupler2s&r�
test_thishost�Utility_Tests.test_thishost�s�����f�n�n�5�5�7��?rr4)r5r6r7r8r�rPr9r:rXs@rrLrL�s����G�@�@rrLc�2`�\sQsQsnQsQsQsQsUsP!)�RequestTestsi�z&Unit tests for urllib.request.Request.c���[OOoUQ2oUOUO	2Q2UQ-2oUOUO	2Q2P!)rr��POST)rfrl�Requestr��
get_method�rrVrls&  r�test_default_values� RequestTests.test_default_values�s[���.�.�(�(���1�2������+�+�-�u�5��1�2�6������+�+�-�v�6rc��[OOoUQQQ5oUOUOQ2UOUO2Q2UQ-QQ5oUOUOQ2UOUO2Q2UQQQ5oUOUO2Q2QUmUOUO2Q2P!)r�HEAD)�methodr�)rfrlrVr�r]rWrXs&  r�test_with_method_arg�!RequestTests.test_with_method_arg�s����.�.�(�(���1�&�A���������0�����+�+�-�v�6��1�2�f�E���������0�����+�+�-�v�6��1�%�@������+�+�-�u�5��������+�+�-�v�6rr4)	r5r6r7r8r�rYr^r9r:rXs@rrSrS�s����0�7�7�7rrS�__main__rW).r��urllib.parserf�urllib.request�urllib.error�http.clientrI�
email.messager�r'r��testr�test.supportrrrrir:r��ImportErrorrrr�has_gethostname�SkipTestrrL�objectrN�TestCaserZr�r�rr�r�rr,rqr�r�rLrSr5�mainr4rr�<module>rns���A������	���"�&�.�	�
�������$�$�$�
�
�
�9�
:�:��,�^<�F�<�bb��)�)�bb�JD9��"�"�D9�N!C�� 1� 1�!C�Hk@��)�)�=�k@�\SE��)�)�SE�jH-�H�-�-�H-�V*"�H�-�-�}�*"�ZJL�8�$�$�JL�ZRI�X�&�&�RI�jA)�h�'�'�A)�FIR�X�&�&�IR�V@�H�%�%�@�7�8�$�$�7�0�z���M�M�O���Q5��
�C��s�F7�7G�=G�G

Youez - 2016 - github.com/yon3zu
LinuXploit