Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_urlparse.cpython-312.opt-2.pyc

�

'Μg:���ddlZddlZddlZddlZdZdZdZdZgdgf�dgf�dgf�dd	gf�d
dgf�dd
gf�dd
gf�ddgf�ddgf�dddgf�ddgf�ddgf�dddgf�dddgf�dgf�d gf�d!gf�d"d#gf�d$d%gf�d&d'gf�d(d'gf�d)d*gf�d+d,gf�d-d.d/gf�d0d1gf�d2d.gf�d3d4d5gf�d6d7d8gf�d9d:gf�d;d<gf�d=d>gf�d?d@gf�dAdBgf�dCdBgf�dDdEgf�dFdGgf�dHdGgf�dIdJgf�dKdJgf�Z	gdif�dif�dif�dddgif�d
ddgif�dddgif�dddgif�dddLgif�ddMdNgif�ddOgdPgdQ�f�dddRgif�dddOgif�ddSgdTgd�f�dddUdVgif�dif�d if�d!if�d"ddgif�d$dd&gif�d&d&dgif�d(d&dgif�d)d&dWgif�d+dXdYgif�d-dZgd[gd\�f�d0d&d]gif�d2d&dZgif�d3d^gd_gd.�f�d6d&d`dagif�d9dbdOgif�d;ddcgif�d=dddZgif�d?d&degif�dfd&dggif�dAdhdigif�dCdhdigif�dDdjdjgif�dFdkdlgif�dHdkdlgif�dIdmdngif�dKdmdngif�Z
Gdo�dpej�ZGdq�drej�Z
Gds�dtej�Zeduk(rej �yy)v�N�http://a/b/c/d;p?q#f�http://a/b/c/d;p?q�http://a/b/c/d��&z&&�=)rrz=a)r�ar	)r	rza=za=b=c)r	�b=cza%3Db=c)�a=b�cza=b&c=d�r	�b)r�dz	a=b%26c=d)r	�b&c=dz&a=bza=a+b&b=b+c�r	�a b�r�b cza=1&a=2�r	�1�r	�2��&s&&�=)rrs=a)r�ar)rrsa=sa=b=c)r�b=csa%3Db=c)�a=b�csa=b&c=d�r�b)r�ds	a=b%26c=d)r�b&c=ds&a=bsa=a+b&b=b+c�r�a b�r!�b csa=1&a=2�r�1�r�2�;a=b)�;ar�a=a+b;b=b+c)r	�	a b;b=b c�;a=b)�;ar!�a=a+b;b=b+c)r�	a b;b=b cuŁ=é)�Ł�éz
%C5%81=%C3%A9z%81=%A9)��r6sŁ=é)�Ł�és
%C5%81=%C3%A9s�=�)����s%81=%A9r
rrrr)r	rrrrrrrrrr!r")rrr#r%r'r)r+r-r/r1r3s
a=a%E2%80%99bsa’br4r5r6r7r8r9r:c�X�eZdZd9d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z!d!�Z"d"�Z#d#�Z$d$�Z%d%�Z&d&�Z'd'�Z(d(�Z)d)�Z*d*�Z+d+�Z,d,�Z-d-�Z.d.�Z/d/�Z0d0�Z1d1�Z2d2�Z3d3�Z4d4�Z5d5�Z6d6�Z7d7�Z8d8�Z9y):�UrlParseTestCaseNc�
�|�|}tjj|�}|j||�|j|j
|j|j|j|jf}|j||�tjj|�}|j||�|j||j��tjj|j��}|j|j�|j��|j||�|j|j|j�|j|j
|j
�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j |j �tjj#|�}|j||�|j|j
|j|j|jf}|j||�tjj%|�}|j||�|j||j��tjj#|j��}|j|j�|j��|j||�|j|j|j�|j|j
|j
�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j|j�|j|j |j �y�N)�urllib�parse�urlparse�assertSequenceEqual�scheme�netloc�path�params�query�fragment�
urlunparse�geturl�assertEqual�username�password�hostname�port�urlsplit�
urlunsplit)	�self�url�parsed�split�url2�result�t�result2�result3s	         �//usr/local/lib/python3.12/test/test_urlparse.py�checkRoundtripsz UrlParseTestCase.checkRoundtripsjs����<��D����&�&�s�+��� � ���0�
�]�]�F�M�M�6�;�;�
�]�]�F�L�L�&�/�/�
;��� � ��F�+��,�,�)�)�&�1��� � ��$�/�� � ��&�-�-�/�:��,�,�'�'��
�
��8��������)�6�=�=�?�;�� � ��&�1�������6�=�=�9�������6�=�=�9�������6�;�;�7�������6�=�=�9�������6�<�<�8�����)�)�6�?�?�;�����)�)�6�?�?�;�����)�)�6�?�?�;�����)�)�6�?�?�;�������6�;�;�7����&�&�s�+��� � ���/�
�]�]�F�M�M�6�;�;�
�\�\�6�?�?�
,��� � ��E�*��,�,�)�)�&�1��� � ��$�/�� � ��&�-�-�/�:��,�,�'�'��
�
��8��������)�6�=�=�?�;�� � ��&�1�������6�=�=�9�������6�=�=�9�������6�;�;�7�������6�<�<�8�����)�)�6�?�?�;�����)�)�6�?�?�;�����)�)�6�?�?�;�����)�)�6�?�?�;�������6�;�;�7rc�B�tD]�\}}tjj|d��}|j	||d|z�|D�cgc]}t|d�s�|��}}tjj|d��}|j	||d|z���ycc}w)NT��keep_blank_values�Error parsing %r�F)�parse_qsl_test_casesr?r@�	parse_qslrK�len�rR�orig�expectrW�v�expect_without_blankss      r[�test_qslzUrlParseTestCase.test_qsl�s���0�L�D�&��\�\�+�+�D�D�+�I�F����V�V�-?�$�-F�G�06�$D��1�#�a��d�)�Q��!�$D��\�\�+�+�D�E�+�J�F����V�%:�.��5�
7�1��%Es�B�Bc�N�tD]�\}}tjj|d��}|j	||d|z�|D�cic]}t||d�r|||��}}tjj|d��}|j	||d|z���ycc}w)NTr^r`rF)�parse_qs_test_casesr?r@�parse_qsrKrdres      r[�test_qszUrlParseTestCase.test_qs�s���/�L�D�&��\�\�*�*�4�4�*�H�F����V�V�-?�$�-F�G�.4�%K�.4���F�1�I�a�L�8I�&'��q�	�\�.4�
"�%K��\�\�*�*�4�5�*�I�F����V�%:�.��5�
7�
0��%Ks�B"c���gd�}d�}|D�cgc]
}||���}}|dgz
}||zD]3\}}}|j|�5|j|||�ddd��5ycc}w#1swY�ExYw)N))�path/to/file)rrrprrr)rrrprr)�
/path/to/file�rrrqrrr�rrrqrr)�//path/to/file)rrE�/to/filerrr)rrErurr)z////path/to/file)rrrtrrr)rrrtrr)z/////path/to/file)rr�///path/to/filerrr)rrrvrr)zscheme:path/to/file)rCrrprrr)rCrrprr)�scheme:/path/to/file�rCrrqrrr�rCrrqrr)zscheme://path/to/file)rCrErurrr)rCrErurr)zscheme:////path/to/file)rCrrtrrr)rCrrtrr)zscheme://///path/to/file)rCrrvrrr)rCrrvrr)zfile:tmp/junk.txt)�filer�tmp/junk.txtrrr)rzrr{rr)�file:///tmp/junk.txt�rzr�
/tmp/junk.txtrrr�rzrr~rr)zfile:////tmp/junk.txt)rzr�//tmp/junk.txtrrr)rzrr�rr)zfile://///tmp/junk.txt)rzr�///tmp/junk.txtrrr)rzrr�rr)zhttp:tmp/junk.txt)�httprr{rrr)r�rr{rr)zhttp://example.com/tmp/junk.txt)r��example.comr~rrr)r�r�r~rr)z http:///example.com/tmp/junk.txt)r�r�/example.com/tmp/junk.txtrrr)r�rr�rr)z!http:////example.com/tmp/junk.txt)r�r�//example.com/tmp/junk.txtrrr)r�rr�rr)zimap://mail.python.org/mbox1)�imap�mail.python.org�/mbox1rrr)r�r�r�rr)z1mms://wms.sys.hinet.net/cts/Drama/09006251100.asf)�mms�wms.sys.hinet.net�/cts/Drama/09006251100.asfrrr)r�r�r�rr)znfs://server/path/to/file.txt)�nfs�server�/path/to/file.txtrrr)r�r�r�rr)z0svn+ssh://svn.zope.org/repos/main/ZConfig/trunk/)�svn+ssh�svn.zope.org�/repos/main/ZConfig/trunk/rrr)r�r�r�rr)z)git+ssh://git@github.com/user/project.git)�git+ssh�git@github.com�/user/project.gitrrr)r�r�r�rr)zEitms-services://?action=download-manifest&url=https://example.com/app)�
itms-servicesrrr�4action=download-manifest&url=https://example.com/appr)r�rrr�r)�+scheme:path/to/file)rrr�rrr)rrr�rr)�sch_me:path/to/file)rrr�rrr)rrr�rrc�|�|djd�td�|dD��td�|dD��fS)Nr�asciic3�>K�|]}|jd����y�w�r�N��encode��.0�xs  r[�	<genexpr>zDUrlParseTestCase.test_roundtrips.<locals>._encode.<locals>.<genexpr>
�����:�T��!�(�(�7�+�T���rac3�>K�|]}|jd����y�wr�r�r�s  r[r�zDUrlParseTestCase.test_roundtrips.<locals>._encode.<locals>.<genexpr>r�r���r��tuple�rXs r[�_encodez1UrlParseTestCase.test_roundtrips.<locals>._encode�@���a�D�K�K��(��:�Q�q�T�:�:��:�Q�q�T�:�:�<�
<r)�schème:path/to/file)rrr�rrr)rrr�rr��subTestr\)rR�	str_casesr�r��bytes_casesrSrTrUs        r[�test_roundtripsz UrlParseTestCase.test_roundtrips�s���W�	�p	<�,5�5�9�a�w�q�z�9��5��
7��	�	�
#,�k�"9��C������c�"��$�$�S�&�%�8�#�"�#:��
6�#�"�s�A�A$�$A-	c���gd�}d�}|D�cgc]
}||���}}||zD]5\}}}}|j|�5|j||||�ddd��7ycc}w#1swY�GxYw)N))rvrqrrrs)zscheme:///path/to/filerwrxry)zfile:/tmp/junk.txtr|r}r)zhttp:/tmp/junk.txtzhttp:///tmp/junk.txt)r�rr~rrr)r�rr~rr)zhttps:/tmp/junk.txtzhttps:///tmp/junk.txt)�httpsrr~rrr)r�rr~rrc��|djd�|djd�td�|dD��td�|dD��fS)Nrr�rac3�>K�|]}|jd����y�wr�r�r�s  r[r�zRUrlParseTestCase.test_roundtrips_normalization.<locals>._encode.<locals>.<genexpr>3r�r�r�c3�>K�|]}|jd����y�wr�r�r�s  r[r�zRUrlParseTestCase.test_roundtrips_normalization.<locals>._encode.<locals>.<genexpr>4r�r��r�r�s r[r�z?UrlParseTestCase.test_roundtrips_normalization.<locals>._encode0sP���a�D�K�K��(��a�D�K�K��(��:�Q�q�T�:�:��:�Q�q�T�:�:�<�
<rr�)	rRr�r�r�r�rSrVrTrUs	         r[�test_roundtrips_normalizationz.UrlParseTestCase.test_roundtrips_normalizationsu��
�	�,	<�
,5�5�9�a�w�q�z�9��5�(1�K�(?�$�C��v�u����c�"��$�$�S�&�%��>�#�"�)@��6�"�"�s�A�A � A)	c���gd�}d�}|D�cgc]
}||���}}d}d}||f}||f}||fD];\}	}
|	D]1}|
D]*\}}
}||z}|f|
z}
|f|z}|j||
|��,�3�=ycc}w)N))z://www.python.org)�www.python.orgrrrr)r�rrr)z://www.python.org#abc)r�rrr�abc)r�rrr�)z://www.python.org?q=abc)r�rr�q=abcr)r�rr�r)z://www.python.org/#abc)r��/rrr�)r�r�rr�)z://a/b/c/d;p?q#f)r	z/b/c/d�p�q�f)r	z/b/c/d;pr�r�c�|�|djd�td�|dD��td�|dD��fS)Nrr�c3�>K�|]}|jd����y�wr�r�r�s  r[r�zIUrlParseTestCase.test_http_roundtrips.<locals>._encode.<locals>.<genexpr>Qr�r�rac3�>K�|]}|jd����y�wr�r�r�s  r[r�zIUrlParseTestCase.test_http_roundtrips.<locals>._encode.<locals>.<genexpr>Rr�r�r�r�r�s r[r�z6UrlParseTestCase.test_http_roundtrips.<locals>._encodeOr�r)r�r�)�http�https)r\)rRr�r�r�r��str_schemes�
bytes_schemes�	str_tests�bytes_tests�schemes�
test_casesrCrSrTrUs               r[�test_http_roundtripsz%UrlParseTestCase.test_http_roundtrips:s����	�"	<�,5�5�9�a�w�q�z�9��5�'��+�
���*�	�#�[�0��$-�{�#;��G�Z�!��*4�&�C��� �3�,�C�$�Y��/�F�#�I��-�E��(�(��f�e�<�	+5�"�$<��6s�A,c�*�|j||��5|jtjj	||�|�|jd�}|jd�}|jd�}|jtjj	||�|�tjj
tjj|��}|jtjj	||�|�tjj
tjj|��}|jtjj	||�|�ddd�y#1swYyxYw)N)�base�relurlr�)r�rKr?r@�urljoinr�rQrP)rRr�r��expected�baseb�relurlb�	expectedbs       r[�	checkJoinzUrlParseTestCase.checkJoin`s��
�\�\�t�F�\�
3����V�\�\�1�1�$��?��J��K�K��(�E��m�m�G�,�G� ����0�I����V�\�\�1�1�%��A�9�M��\�\�,�,�V�\�\�-B�-B�6�-J�K�F����V�\�\�1�1�$��?��J��l�l�-�-�f�l�l�.C�.C�G�.L�M�G����V�\�\�1�1�%��A�9�M�4�
3�
3�s�E,F	�	Fc��gd�}|D�cgc]}|jd���}}||zD]�}|jtjj	tjj|��|�|jtjj
tjj|��|���ycc}w)N)�Pythonz./Python�x-newscheme://foo.com/stuffzx://yzx:/yzx:/r�r�)r�rKr?r@rQrPrIrA)rRr�r�r��us     r[�test_unparse_parsez#UrlParseTestCase.test_unparse_parsems���b�	�2;�<�)�Q�q�x�x��(�)��<��[�(�A����V�\�\�4�4�V�\�\�5J�5J�1�5M�N�PQ�R����V�\�\�4�4�V�\�\�5J�5J�1�5M�N�PQ�R�)��=s�Cc��|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtd	d
�|jtdd�|jtd
d�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtd d�|jtd!d"�|jtd#d$�|jtd%d$�|jtd&d�|jtd'd(�|jtd)d*�|jtd+d,�|jtd-d.�|jtd/d0�|jtd1d"�|jtd2d�|jtd3d4�|jtd5d6�y)7N�g:h�g�http://a/b/c/g�./g�g/�http://a/b/c/g/�/g�
http://a/g�//g�http://g�g?y�http://a/b/c/g?y�g?y/./x�http://a/b/c/g?y/./x�#s�http://a/b/c/d;p?q#s�g#s�http://a/b/c/g#s�g#s/./x�http://a/b/c/g#s/./x�g?y#s�http://a/b/c/g?y#s�g;x�http://a/b/c/g;x�g;x?y#s�http://a/b/c/g;x?y#s�.�
http://a/b/c/�./�..�http://a/b/�../�../g�http://a/b/g�../..�	http://a/�../../�../../grr�g.�http://a/b/c/g.�.g�http://a/b/c/.g�g..�http://a/b/c/g..�..g�http://a/b/c/..g�./../g�./g/.�g/./h�http://a/b/c/g/h�g/../h�http://a/b/c/h)r��RFC1808_BASE�rRs r[�test_RFC1808zUrlParseTestCase.test_RFC1808ts�����|�U�E�2����|�S�*:�;����|�U�,<�=����|�T�+<�=����|�T�<�8����|�U�J�7����|�U�,>�?����|�Y�0F�G����|�T�+A�B����|�U�,>�?����|�Y�0F�G����|�W�.B�C����|�U�,>�?����|�Y�0F�G����|�S�/�:����|�T�?�;����|�T�=�9����|�U�M�:����|�V�^�<����|�W�k�:����|�X�{�;����|�Y��=�	
���|�R�)?�@����|�T�+<�=����|�T�+<�=����|�U�,>�?����|�U�,>�?����|�X�~�>����|�W�.?�@����|�W�.@�A����|�X�/?�@rc�b�|jtjjd�d�y)Nzmailto:1337@example.org)�mailtorz1337@example.orgrrr�rKr?r@rArs r[�test_RFC2368zUrlParseTestCase.test_RFC2368�s&��������.�.�/H�I�>�	@rc�V�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtd	d
�|jtdd�|jtd
d�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd �|jtd!d �|jtd"d�|jtd#t�|jtd$d%�|jtd&d'�|jtd(d)�|jtd*d+�|jtd,d�|jtd-d�|jtd.d/�|jtd0d1�|jtd2d3�|jtd4d5�|jtd6d7�|jtd8d9�|jtd:d;�|jtd<d=�y)>Nr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrrr	r
rrr
rr�	g;x=1/./y�http://a/b/c/g;x=1/y�
g;x=1/../y�http://a/b/c/yr�r��g?y/../x�http://a/b/c/g?y/../xr�r��g#s/../x�http://a/b/c/g#s/../x)r��RFC2396_BASErs r[�test_RFC2396zUrlParseTestCase.test_RFC2396�sJ��	
���|�U�E�2����|�S�*:�;����|�U�,<�=����|�T�+<�=����|�T�<�8����|�U�J�7����|�U�,>�?����|�T�+A�B����|�U�,>�?����|�W�.B�C����|�U�,>�?����|�Y�0F�G����|�S�/�:����|�T�?�;����|�T�=�9����|�U�M�:����|�V�^�<����|�W�k�:����|�X�{�;����|�Y��=����|�R��6����|�T�+<�=����|�T�+<�=����|�U�,>�?����|�U�,>�?����|�X�~�>����|�W�.?�@����|�W�.@�A����|�X�/?�@����|�[�2H�I����|�\�3C�D����|�Y�0F�G����|�Z�1H�I����|�Y�0F�G����|�Z�1H�Irc�@�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtd	d
�|jtdd�|jtd
d�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtd d!�|jtd"d!�|jtd#d$�|jtd%d&�|jtd'd&�|jtd(d�|jtd)d�|jtd)d�|jtd*d�|jtd+d�|jtd,d�|jtd-d.�|jtd/d0�|jtd1d2�|jtd3d4�|jtd5d$�|jtd6d
�|jtd7d8�|jtd9d:�|jtd;d<�|jtd=d>�|jtd?d@�|jtdAdB�|jtdCdD�|jtdEdF�|jtdGd�|jdHdd�y)IN�?yzhttp://a/b/c/d;p?yz;xzhttp://a/b/c/;xr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�rrz
../../../gz
../../../../gz/./gz/../grrrrrrrr	r
rrr
rrrrrrr�r�rrr�r�rr�http:gzhttp://a/b/c/de)r��RFC3986_BASErs r[�test_RFC3986zUrlParseTestCase.test_RFC3986�s�����|�T�*>�?����|�T�+<�=����|�U�5�1����|�S�)9�:����|�U�+;�<����|�T�*;�<����|�T�,�7����|�U�:�6����|�T�*>�?����|�U�+=�>����|�T�*@�A����|�U�+=�>����|�W�-A�B����|�T�*;�<����|�U�+=�>����|�Y�/E�F����|�R�(<�=����|�S��9����|�T�/�:����|�T�-�8����|�U�=�9����|�V�N�;����|�W�[�9����|�X�k�:����|�Y�|�<����|�\�<�@�	
���|�\�,�?����|�_�\�B����|�V�L�9����|�W�\�:����|�T�*;�<����|�T�*;�<����|�U�+=�>����|�U�+=�>����|�X�n�=����|�W�->�?����|�W�-?�@����|�X�.>�?����|�[�1G�H����|�\�2B�C����|�Y�/E�F����|�Z�0G�H����|�Y�/E�F����|�Z�0G�H����|�X�.>�?�	
���(�$�/@�Arc�4�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd	�|jtd
d�|jtdd
�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtdd�|jtd d	�|jtd!d"�|jtd#d$�|jtdd�|jtdd�|jtd%d�|jtd&d�|jtd'd�|jd(dd(�|jd)dd�|jd)d*d*�|jd+d,d-�|jd.d,d/�|jd0dd1�|jd2dd3�|jtd4zd5td6z�|jd7d8d9�|jd:d8d;�|jd7d<d=�|jd:d<d=�|jd7d>d?�|jdd8d=�|jd@dAdA�y)BNr�r$r��http:rr�r�r�r�r�r�r�r�r#zhttp://a/b/c/d?yr�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrr
rrzhttp:?yzhttp:g?yzhttp:g?y/./xzhttp:///rzhttp://a/./gzsvn://pathtorepo/dir1�dir2zsvn://pathtorepo/dir2zsvn+ssh://pathtorepo/dir1zsvn+ssh://pathtorepo/dir2zws://a/bzws://a/gz	wss://a/bz	wss://a/gr��fooz/foozhttp://a/b/c/d/e/z
../../f/g/zhttp://a/b/c/f/g/zhttp://a/b/c/d/ezhttp://a/b/f/g/z/../../f/g/z
http://a/f/g/z	../../f/gzhttp://a/b/c/f/gr	r)r��SIMPLE_BASErs r[�
test_urljoinszUrlParseTestCase.test_urljoinss������{�E�%�0����{�H�-=�>����{�G�,<�=����{�C�(8�9����{�E�*:�;����{�D�):�;����{�D��6����{�E�*�5����{�D�);�<����{�E�*<�=����{�I�.D�E����{�C��8����{�D��9����{�D��7����{�E�-�8����{�F�>�:����{�G�K�8����{�I�l�;����{�H�^�<����{�G�,=�>����{�G�,>�?����{�H�-=�>����{�H�-=�>����{�G�,<�=����{�I�.@�A����{�J�/A�B����{�N�3I�J����z�4�
�3����r�1�2H�I����r�>�>�:����.��8O�P����2�F�<W�X����z�#�j�1����{�3�{�3�	
���{�S�(�%��v�1E�F�	
���*�L�:M�N����)�<�9J�K����*�M�?�K����)�=�/�J����*�K�9K�L����}�l�O�D�	
���s�C��%rc��gd�}d�}|D�cgc]
}||���}}||zD]O\}}}tjj|�}|j|j|j
f||f��Qgd�}|D�cgc]}|j
d���}}||zD]1}	|jttjj|	��3ycc}wcc}w)N))z http://Test.python.org:5432/foo/�test.python.org�8)zhttp://12.34.56.78:5432/foo/�12.34.56.78r/)zhttp://[::1]:5432/foo/�::1r/)zhttp://[dead:beef::1]:5432/foo/�dead:beef::1r/)zhttp://[dead:beef::]:5432/foo/�dead:beef::r/)z:http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:5432/foo/�'dead:beef:cafe:5417:affe:8fa3:deaf:feedr/)z http://[::12.34.56.78]:5432/foo/�
::12.34.56.78r/)z%http://[::ffff:12.34.56.78]:5432/foo/�::ffff:12.34.56.78r/)zhttp://Test.python.org/foo/r.N)zhttp://12.34.56.78/foo/r0N)zhttp://[::1]/foo/r1N)zhttp://[dead:beef::1]/foo/r2N)zhttp://[dead:beef::]/foo/r3N)z5http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/r4N)zhttp://[::12.34.56.78]/foo/r5N)z http://[::ffff:12.34.56.78]/foo/r6N)zhttp://Test.python.org:/foo/r.N)zhttp://12.34.56.78:/foo/r0N)zhttp://[::1]:/foo/r1N)zhttp://[dead:beef::1]:/foo/r2N)zhttp://[dead:beef::]:/foo/r3N)z6http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:/foo/r4N)zhttp://[::12.34.56.78]:/foo/r5N)z!http://[::ffff:12.34.56.78]:/foo/r6Nc�Z�|djd�|djd�|dfS)Nrr�rar�r�r�s r[r�z.UrlParseTestCase.test_RFC2732.<locals>._encodegs-���Q�4�;�;�w�'��1����W�)=�q��t�C�Cr)zhttp://::12.34.56.78]/zhttp://[::1/foo/zftp://[::1/foo/bad]/badzhttp://[::1/foo/bad]/badzhttp://[::ffff:12.34.56.78r�)	r?r@rArKrNrOr��assertRaises�
ValueError)
rRr�r�r�r�rSrNrO�	urlparsed�invalid_urls
          r[�test_RFC2732zUrlParseTestCase.test_RFC2732Fs����	�@	D�+4�5�9�a�w�q�z�9��5�#,�{�#:��C��4����-�-�c�2�I����i�0�0�)�.�.�A�X�t�DT�U�$;�.�	�3<�<�)�Q�q�x�x��(�)��<�$�{�2�K����j�&�,�,�*?�*?��M�3��6��=s�C�<Cc��ddddddddtd	d
ftd	dfg
}d�}|D�cgc]
}||���}}||zD]�\}}}tjj	|�}|j|j
�|�|j|||f�|j|j|�|j|j|���ycc}w)
N)zhttp://python.org#frag�http://python.org�frag)r>r>r)zhttp://python.org/#frag�http://python.org/r?)r@r@r)zhttp://python.org/?q#frag�http://python.org/?qr?)rArAr)zhttp://python.org/p#fragzhttp://python.org/pr?)�http://python.org/p?qrBrrr�rc�2�t|�d�|D��S)Nc3�>K�|]}|jd����y�wr�r�r�s  r[r�zCUrlParseTestCase.test_urldefrag.<locals>._encode.<locals>.<genexpr>�s����8�a��1�8�8�G�,�a�r�)�typer�s r[r�z0UrlParseTestCase.test_urldefrag.<locals>._encode�s���4��7�8�a�8�8�8r)	rr r?r@�	urldefragrKrJrSrH)	rRr�r�r�r�rS�defragr?rWs	         r[�test_urldefragzUrlParseTestCase.test_urldefragxs���C�:�E�<�I�@�G�B�
�/��5�
�/��4�
�	�	9�+4�5�9�a�w�q�z�9��5�!*�[�!8��C����\�\�+�+�C�0�F����V�]�]�_�c�2����V�f�d�^�4����V�Z�Z��0����V�_�_�d�3�"9��6s�C
c�`�tjjd�}|j|jd�|j|j
d�tjjd�}|j|jd�|j|j
d�y)Nz,http://[FE80::822a:a8ff:fe49:470c%tESt]:1234zfe80::822a:a8ff:fe49:470c%tEStz%[FE80::822a:a8ff:fe49:470c%tESt]:1234s,http://[FE80::822a:a8ff:fe49:470c%tESt]:1234sfe80::822a:a8ff:fe49:470c%tESts%[FE80::822a:a8ff:fe49:470c%tESt]:1234)r?r@rPrKrNrD)rRr�s  r[�test_urlsplit_scoped_IPv6z*UrlParseTestCase.test_urlsplit_scoped_IPv6�s����L�L�!�!�"P�Q��������%E�F�������#J�K��L�L�!�!�"Q�R��������%F�G�������#K�Lrc��d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|j�dd|dd�d	}tjj|�}|j|jd�|j|j
d
�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd
�|j|jd�|j|jd�|j|j�|�d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd
�|j|jd�|j|jd�|j|j�|�d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|j�dd|dd�d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|j�|�d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|jd �|j|jd�|j|jd�|j|jd�|j|j�|�d!}tjj|�}|jtd"�5|jddd�y#1swYyxYw)#NzHTTP://WWW.PYTHON.ORG/doc/#fragr�zWWW.PYTHON.ORG�/doc/rr?r���7http://User:Pass@www.python.org:080/doc/?query=yes#frag�User:Pass@www.python.org:080�	query=yes�User�Pass�PzChttp://User@example.com:Pass@www.python.org:080/doc/?query=yes#frag�(User@example.com:Pass@www.python.org:080zUser@example.comsHTTP://WWW.PYTHON.ORG/doc/#fragr�sWWW.PYTHON.ORG�/doc/r�frag�www.python.orgs7http://User:Pass@www.python.org:080/doc/?query=yes#frag�User:Pass@www.python.org:080�	query=yes�User�PasssChttp://User@example.com:Pass@www.python.org:080/doc/?query=yes#frags(User@example.com:Pass@www.python.org:080sUser@example.coms%HTTP://WWW.PYTHON.ORG:65536/doc/#fragzout of range)r?r@rPrKrCrDrErGrHrLrMrNrOrJ�assertRaisesRegexr9)rRrSr�s   r[�test_urlsplit_attributesz)UrlParseTestCase.test_urlsplit_attributes�s���/���L�L�!�!�#�&��������6�*�������#3�4��������)�������"�%�������V�,�������T�*�������T�*�������%5�6��������&�	
�������A�B���Q�R��1�G���L�L�!�!�#�&��������6�*�������#A�B��������)�������+�.�������V�,�������V�,�������V�,�������%5�6��������$��������S�)�T���L�L�!�!�#�&��������6�*�������#M�N��������)�������+�.�������V�,�������%7�8�������V�,�������%5�6��������$��������S�)�1���L�L�!�!�#�&��������7�+�������#4�5��������*�������#�&�������W�-�������T�*�������T�*�������%6�7��������&��������A�B���Q�R��1�H���L�L�!�!�#�&��������7�+�������#B�C��������*�������,�/�������W�-�������W�-�������W�-�������%6�7��������$��������S�)�T���L�L�!�!�#�&��������7�+�������#N�O��������*�������,�/�������W�-�������%8�9�������W�-�������%6�7��������$��������S�)�7���L�L�!�!�#�&��
�
#�
#�J��
?�
�F�F�@�
?�
?�s�2
_�_c���d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|jd�|j|j�d�d}tjj|�}|j|jd	�|j|j
d
�|j|jd�|j|jd�|j|jd
�|j|jd�|j|jd�|j|jd
�|j|jd�|j|j�d�d}d}td�D]_}tjj||��}|j|jd�|j|j�d��ay)NzQhttp	://www.python
.org	/java
script:	alert('msg
')/?query
=	something#frag
mentr�r�z/javascript:alert('msg')/zquery=somethingrHzGhttp://www.python.org/javascript:alert('msg')/?query=something#fragmentsQhttp	://www.python
.org	/java
script:	alert('msg
')/?query
=	something#frag
mentr�rWs/javascript:alert('msg')/squery=something�fragmentsGhttp://www.python.org/javascript:alert('msg')/?query=something#fragmentzNhttp://www.python.org/java
script:	alert('msg
')/?query
=	something#frag
mentzht
tpr��rC)r?r@rPrKrCrDrErGrHrLrMrNrOrJ�range)rRrSr�rC�_s     r[�!test_urlsplit_remove_unsafe_bytesz2UrlParseTestCase.test_urlsplit_remove_unsafe_bytes�s4��k���L�L�!�!�#�&��������6�*�������#3�4�������!<�=�������"3�4�������Z�0�������T�*�������T�*�������%5�6��������&��������%n�o�m���L�L�!�!�#�&��������7�+�������#4�5�������!=�>�������"4�5�������[�1�������T�*�������T�*�������%6�7��������&��������%o�p�f�����q��A����%�%�c�&�%�9�A����Q�X�X�v�.����Q�X�X�Z�)r�s�rc�	�ttdd��}d}|jd�|z}tjj|�}|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd	�|j
|jd
�|j
|jd�|j
|jd�|j
|jd
�|j
|j!�|�||j#d�z}tjj|�}|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd
�|j
|j!�|j#d��d}tjj|jd�|z�}|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|jd�|j
|j!�|�tjjd�}|j
tjj%|�d�d}|jd�dz|jd�z}td�D]_}tjj||��}|j
|jd�|j
|j!�d��ay) Nr�!rN�utf-8r�rOrLrPr?rQrRr�rSr�rXrUrYrVrZr[rWz)https://www.python.org:88/doc/?query=    r�zwww.python.org:88z
query=    �Xz
www.pypi.org z//www.python.org/r�r`zhttps://www.python.org/)�bytesra�decoder?r@rPrKrCrDrErGrHrLrMrNrOrJr�rQ)rR�noise�base_urlrSr��query_spaces_urlrCrbs        r[�test_urlsplit_strip_urlz(UrlParseTestCase.test_urlsplit_strip_urls^���e�A�x�(�)��L���l�l�7�#�h�.���L�L�!�!�#�&��������6�*�������#A�B��������)�������+�.�������V�,�������V�,�������V�,�������%5�6��������$��������X�.��h�o�o�g�.�.���L�L�!�!�#�&��������7�+�������#B�C��������*�������,�/�������W�-�������W�-�������W�-�������%6�7��������$��������X�_�_�W�%=�>�G���L�L�!�!�%�,�,�w�"7�:J�"J�K��������7�+�������#6�7��������)�������,�/��������$��������%5�6��L�L�!�!�/�2��	
������0�0��3�_�E�"�����g�&��0�5�<�<��3H�H���q��A����%�%�c�&�%�9�A����Q�X�X�w�/����Q�X�X�Z�)B�C�rc
�V�	dD�]
}tjjtjjfD]�}dD]�}|j	|||��5d|z}d|zdz}|rM|j�r3|j�r#|j
d�}|j
d�}n
	ddd��t||�}|j|j|�|jt�5|jddd�ddd�������
y#1swY�xYw#1swY��xYw)N�FT)	r*z1.5z-1�0x10z-0�1_1z 1z1 u६)rhr@rOzwww.example.net:zhttp://r�r�)r?r@rPrAr��isasciir�rKrDr8r9rO)rRrhr@rOrDrSr�s       r[�test_attributes_bad_portz)UrlParseTestCase.test_attributes_bad_portUs���.�"�E� �,�,�/�/����1F�1F�G��X�D����E��T��J�!3�d�!:��'�&�0�3�6�� �%�~�~�/�D�L�L�N�)/���w�)?��&)�j�j��&9�� (�K�J�"�#�J���(�(����6�:�!�.�.�z�:��F�F�;�K�J�Y�H�#�;�:��K�J�s+�AD	�59D	�.
D�;D	�D�D	�D(
c	���	dD]�}tjjtjjfD]�}dD]�}|j	|||��5|dz}|r,|j�r|j
d�}n
	ddd��K||�}|r|j|jd�n|j|jd�ddd�������y#1swY��xYw)Nro)r��+�-�0zhttp&u६http)rhr@rCz://www.example.netr�rr)	r?r@rPrAr�rrr�rKrC)rRrhr@rCrSr�s      r[�test_attributes_bad_schemez+UrlParseTestCase.test_attributes_bad_schemehs���0�"�E� �,�,�/�/����1F�1F�G��F�F����E��v��N�$�';�;�� �"�{�{�}�&)�j�j��&9�� (�
O�N�"�#�J�� � �,�,�Q�X�X�s�;� �,�,�Q�X�X�r�:�O�N�G�H�#�O�N�s�+C	�AC	�C&
c�d�d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|j�|�tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|j�|�d}tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|j�|�tjj|�}|j|jd�|j|j
d�|j|jd�|j|jd�|j|jd�|j|j�|�y)Nz0sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15rs0sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15r)r?r@rPrKrDrLrMrNrOrJrA)rR�urir�s   r[�test_attributes_without_netlocz/UrlParseTestCase.test_attributes_without_netloczsJ��A���L�L�!�!�#�&��������2�&�������T�*�������T�*�������T�*��������&��������S�)��L�L�!�!�#�&��������2�&�������T�*�������T�*�������T�*��������&��������S�)�B���L�L�!�!�#�&��������3�'�������T�*�������T�*�������T�*��������&��������S�)��L�L�!�!�#�&��������3�'�������T�*�������T�*�������T�*��������&��������S�)rc��|jtjjd�d�|jtjjd�d�y)Nz http://example.com?blahblah=/foo)r�r�rrz
blahblah=/foors http://example.com?blahblah=/foo)r�sexample.comrrs
blahblah=/foorrrs r[�test_noslashzUrlParseTestCase.test_noslash�sJ��������.�.�/Q�R�M�	O�������.�.�/R�S�S�	Urc�8�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd	�d
�|jtjjd�d�y)
NrE)rrrErrrz//www.python.org:80)r�www.python.org:80rrrr�http://www.python.org:80�r�rrrrr�path)rrr�rrrs//www.python.org:80)r�www.python.org:80rrrr�http://www.python.org:80�r�r�rrrrrrs r[�test_withoutschemez#UrlParseTestCase.test_withoutscheme�s���
	
������.�.�v�6�'�	)�������.�.�/D�E�4�	6�������.�.�/I�J�8�	:�	
������.�.�w�7�-�	/�������.�.�/E�F�:�	<�������.�.�/J�K�>�	@rc�l�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd	�d
�|jtjjd�d�|jtjjd
�d�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd�d�y)Nzhttp:80)r�r�80rrrzhttps:80)r�rr�rrrzpath:80)rErr�rrrr()r�rrrrrzhttps:)r�rrrrrr�r�shttp:80)r�r�80rrrshttps:80)r�rr�rrrspath:80)r�rr�rrrshttp:)r�rrrrrshttps:)r�rrrrrr�r�rrs r[�test_portseparatorz#UrlParseTestCase.test_portseparator�s���������.�.�y�9�;T�U�������.�.�z�:�<V�W�������.�.�y�9�;T�U�������.�.�w�7�8O�P�������.�.�x�8�9Q�R�������.�.�/I�J�8�	:�	
������.�.�z�:�<[�\�������.�.�{�;�=]�^�������.�.�z�:�<[�\�������.�.�x�8�9V�W�������.�.�y�9�:X�Y�������.�.�/J�K�>�	@rc�b�|jttjjd�y)Nr*)r8�	TypeErrorr?r@�	urlencoders r[�
test_usingsyszUrlParseTestCase.test_usingsys�s�����)�V�\�\�%;�%;�U�Crc���|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd�d�|jtjjd	�d
�|jtjjd�d�|jtjjd
�d�|jtjjd�d�y)Nzs3://foo.com/stuff)�s3�foo.com�/stuffrrrr�)�x-newschemer�r�rrrz*x-newscheme://foo.com/stuff?query#fragment)r�r�r�rrGrHz!x-newscheme://foo.com/stuff?query)r�r�r�rrGrss3://foo.com/stuff)ss3�foo.com�/stuffrrrsx-newscheme://foo.com/stuff)�x-newschemer�r�rrrs*x-newscheme://foo.com/stuff?query#fragment)r�r�r�r�queryr_s!x-newscheme://foo.com/stuff?query)r�r�r�rr�rrrs r[�test_anyschemezUrlParseTestCase.test_anyscheme�s$��������.�.�/C�D�@�	B�������.�.�/L�M�I�	K�������.�.�/[�\�V�	X�������.�.�/R�S�N�	P�	
������.�.�/D�E�F�	H�������.�.�/M�N�O�	Q�������.�.�/\�]�\�	^�������.�.�/S�T�T�	Vrc��tjjtjjfD�]:}|j	|��5|dd�}|j|jd�|dd�}|j|jd�|j|dd�jd�|j|dd�	�jd�|j|d
d�	�jd�|j|d�jd�|j|d
�jd�|j|d
d�jd�ddd���=y#1swY��IxYw)
N)�functionzhttp://example.net/�ftpr�shttp://example.net/sftpr�rEr`r�rr)r?r@rArPr�rKrC)rR�funcrWs   r[�test_default_schemez$UrlParseTestCase.test_default_scheme�s-���\�\�*�*�F�L�L�,A�,A�B�D����t��,��3�U�;��� � �����7��4�f�=��� � �����8�� � ��f�e�!4�!;�!;�U�C�� � ��f�U�!;�!B�!B�E�J�� � ��g�f�!=�!D�!D�f�M�� � ��f��!4�!4�b�9�� � ��g��!5�!5�s�;�� � ��g�r�!2�!9�!9�3�?�-�,�C�,�,�s
�DE4�4E>	c
�J�d}|D�]�\}}}tjjtjjfD�]O}|dk(r|tjjurd}|j	||��5||d��}|j|jd�|jt||�jd|z��|j||dd�jd�||d	��}|j|j|�|jt||�j|��|j||dd	�j|�|j||�j|�ddd���R���y#1swY��axYw)
N)
)z
http:#fragrEr?)z//example.net#fragrEr?)zindex.html#fragrEr?)z	;a=b#fragrFr?)z	?a=b#fragrGr?)z#fragrEr?)z	abc#@fragrE�@frag)z//abc#@fragrEr�)z//abc:80#@fragrEr�)z//abc#@frag:80rEz@frag:80rFrE)rSr�F)�allow_fragmentsr�#T)r?r@rArPr�rKrH�
assertTrue�getattr�endswith�assertFalse)rR�testsrS�attr�
expected_fragr�rWs       r[�test_parse_fragmentsz%UrlParseTestCase.test_parse_fragments�se��
��).�$�C��}����.�.����0E�0E�F���8�#�����0E�0E�(E�!�D��\�\�c�D�\�9�!�#�u�=�F��$�$�V�_�_�b�9��O�O�#�F�D�1�:�:�3��;N�O�Q��$�$�T�#�r�5�%9�%B�%B�B�G�!�#�t�<�F��$�$�V�_�_�m�D��$�$�#�F�D�1�:�:�=�I�K��$�$�T�#�r�4�%8�%A�%A�%2�4��$�$�T�#�Y�%7�%7��G�:�9�G�).�:�9�s
�;DF�F"c���|jtd�5tjj	dd�ddd�|jtd�5tjj	dd�ddd�|jtd�5tjjdd�ddd�|jtd�5tjjdd�ddd�|jtd�5tjj
d�ddd�|jtd�5tjj
d�ddd�|jtd�5tjjd�ddd�|jtd�5tjjd	�ddd�|jtd�5tjjd
d�ddd�|jtd�5tjjdd
�ddd�y#1swY��>xYw#1swY��xYw#1swY���xYw#1swY���xYw#1swY��wxYw#1swY��FxYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)NzCannot mix strr�r�rWr�)r�r�rrrr)r�rWrrrr)r�r�rrr)r�rWrrrr>shttp://python.org)	r\r�r?r@rArPrIrQr�rs r[�test_mixed_types_rejectedz*UrlParseTestCase.test_mixed_types_rejecteds���
#�
#�I�/?�
@��L�L�!�!�"2�G�<�A�
�
#�
#�I�/?�
@��L�L�!�!�"3�V�<�A�
�
#�
#�I�/?�
@��L�L�!�!�"2�G�<�A�
�
#�
#�I�/?�
@��L�L�!�!�"3�V�<�A�
�
#�
#�I�/?�
@��L�L�#�#�$L�M�A�
�
#�
#�I�/?�
@��L�L�#�#�$K�L�A�
�
#�
#�I�/?�
@��L�L�#�#�$H�I�A�
�
#�
#�I�/?�
@��L�L�#�#�$H�I�A�
�
#�
#�I�/?�
@��L�L� � �!4�6J�K�A�
�
#�
#�I�/?�
@��L�L� � �!5�7J�K�A�
@�%A�
@��
@�
@��
@�
@��
@�
@��
@�
@��
@�
@��
@�
@��
@�
@��
@�
@��
@�
@�sw�!I4�!J�!J�!J� J(� J5� K�
 K�!K�
!K'�4I>�J�J�J%�(J2�5J?�K�K�K$�'K0c��t|j�}|j}|j|j|�d|z}d|z}||�}||�}d}d}	|j||�|j|j
�|�|j|j
�|�|j|j
|�|�|j|j
|�|�|j|j
||	�|�|j|j
||	�|�|j||�|j|j�|�|j|j�|�|j|j|�|�|j|j|�|�|j|j||	�|�|j|j||	�|�y)N)r)rr��strict)rd�_fields�_encoded_counterpart�assertIs�_decoded_counterpartrKrir�)
rR�str_type�num_args�
bytes_type�str_args�
bytes_args�
str_result�bytes_result�encoding�errorss
          r[�_check_result_typez#UrlParseTestCase._check_result_type0s����x�'�'�(���2�2�
��
�
�j�5�5�x�@��8�#���h�&�
��x�(�
�!�:�.����������X�.�����,�,�.��9�����,�,�.�
�;�����,�,�X�6��A�����,�,�X�6�
�C�����,�,�X�v�>��I�����,�,�X�v�>�
�K�����z�2�����*�*�,�j�9�����*�*�,�l�;�����*�*�8�4�j�A�����*�*�8�4�l�C�����*�*�8�V�<�j�I�����*�*�8�V�<�l�Krc���tjjtjjtjjg}|D]}|j|��yr>)r?r@�DefragResult�SplitResult�ParseResultr�)rR�result_types�result_types   r[�test_result_pairsz"UrlParseTestCase.test_result_pairsIsL���,�,�
#�
#�
�,�,�
"�
"�
�,�,�
"�
"�
��
(�K��#�#�K�0�(rc�"�tjjdd��}|j|ddgi�tjjdd��}|j|ddgi�tjjdd��}|j|dd	gi�tjjd
d��}|j|ddgi�tjjd
dd�
�}|j|ddgi�y)N�	key=Ł%E9�latin-1�r��key�Łé�key=Ł%C3%A9rfr��Ł���
key=Ł%E9-�Ł�-�ignore�r�r��Ł-)r?r@rmrK�rRrWs  r[�test_parse_qs_encodingz'UrlParseTestCase.test_parse_qs_encodingSs�����&�&���&�K������%�,��!8�9����&�&�'9�G�&�L������%�,��!8�9����&�&�'9�G�&�L������%�*>�)?�!@�A����&�&�'7�'�&�J������%�/�):�!;�<����&�&�'7�'�AI�'�K������%�)��!5�6rc��tjjdd��}|j|dg�tjjdd��}|j|dg�tjjdd��}|j|dg�tjjd	d��}|j|d
g�tjjd	dd��}|j|d
g�y)Nr�r�r�)r�r�r�rfr�)r�r�r�)r�r�r�r�)r�r�)r?r@rcrKr�s  r[�test_parse_qsl_encodingz(UrlParseTestCase.test_parse_qsl_encoding`s������'�'��)�'�L������"7�!8�9����'�'�(:�W�'�M������"7�!8�9����'�'�(:�W�'�M������"?�!@�A����'�'�(8�7�'�K������":�!;�<����'�'�(8�7�AI�(�K������"4�!5�6rc�(�|jt�5tjj	djdgdz�d��ddd�tjj	djdgdz�d��y#1swY�>xYw)Nrza=a��
)�max_num_fields)r8r9r?r@rc�joinrs r[�test_parse_qsl_max_num_fieldsz.UrlParseTestCase.test_parse_qsl_max_num_fieldsmsj��
�
�
�z�
*��L�L�"�"�3�8�8�U�G�B�J�#7��"�K�+������s�x�x����
�3�B��G�+�
*�s�5B�Bc
��difdifdddgifddgdgd	�fd
dddgifd
ifdifdddgifddgdgd�fddddgifg
}|D]�\}}|jd|�d|���5tjj|d��}|j	||d|z�tjj|d
��}|j	||d|z�ddd���y#1swY��xYw)N�;�;;r,r	rr.rrr
�a=1;a=2rr�;�;;r0rr!r2r%r'r �a=1;a=2r)r+�
Original: �, Expected: ��	separatorr`)r�r?r@rmrK)rR�parse_qs_semicolon_casesrfrgrW�result_bytess      r[�test_parse_qs_separatorz(UrlParseTestCase.test_parse_qs_separatorrs!��
�"�I�
�2�J�
�c�C�5�\�"�
�5�'���8�9�
��s�C�j�)�*�
�2�J�
�B�K�
�t�d�V�n�%�
�V�H�V�H�=�>�
�$��t��-�.�$
� �5�L�D�&����
�4�(�,�v�j�I�J����.�.�t�s�.�C��� � ���1C�d�1J�K�%�|�|�4�4�T�T�4�J��� � ��v�7I�D�7P�Q�	K�J�5�J�J�s
�A/C�C	c��dgfdgfddgfdddgfdd	d
gfdgfdgfd
dgfdddgfdddgfg
}|D]�\}}|jd|�d|���5tjj|d��}|j	||d|z�tjj|d��}|j	||d|z�ddd���y#1swY��xYw)Nr�r�r,r
r.rrr�rrr�r�r0r r2r$r&r�r(r*r�r�r�r`)r�r?r@rcrK)rR�parse_qsl_semicolon_casesrfrgrWr�s      r[�test_parse_qsl_separatorz)UrlParseTestCase.test_parse_qsl_separator�s	��
�"�I�
�2�J�
�j�\�"�
�\�<�8�9�
��Z�0�1�
�2�J�
�B�K�
�|�n�%�
�n�n�=�>�
�,��5�6�%
�!�6�L�D�&����
�4�(�,�v�j�I�J����/�/���/�D��� � ���1C�d�1J�K�%�|�|�5�5�d�d�5�K��� � ��v�7I�D�7P�Q�	K�J�6�J�J�s
�
A/C�C
	c�H�|jtjjd�dg�|jtjjt	d��dg�|jtjjtd��dg�y)Nrr )rKr?r@rc�	bytearray�
memoryviewrs r[�test_parse_qsl_bytesz%UrlParseTestCase.test_parse_qsl_bytes�so��������/�/��7�,��H�������/�/�	�&�0A�B�\�N�S�������/�/�
�6�0B�C�l�^�Trc
��tdd��}dddddgitd�fD]c}|jtjj
|fi|��g�|j
ttjj
|d���ey)	NT)r_�strict_parsingrrr�rar�)�dictr�rKr?r@rcr8r9)rR�kwargsr�s   r[�test_parse_qsl_false_valuez+UrlParseTestCase.test_parse_qsl_false_value�ss����T�B���S�$��3��B�
�3��?�A����V�\�\�3�3�A�@��@�"�E����j�&�,�,�*@�*@�!�q��Q�@rc��|jttjjtd��|jttjjt
d��|jttjjd�|jttjjt��dD]A}|jt�5tjj	d|��ddd��C|jt�5tjj	dd��ddd�|jt�5tjj	dd��ddd�y#1swY��xYw#1swY�UxYw#1swYyxYw)Nrra)rrNrrar�g�?rr��¦��)r8r�r?r@rc�list�iter�objectr9�UnicodeEncodeError�UnicodeDecodeError)rRr�s  r[�test_parse_qsl_errorsz&UrlParseTestCase.test_parse_qsl_errors�s%�����)�V�\�\�%;�%;�T�&�\�J����)�V�\�\�%;�%;�T�&�\�J����)�V�\�\�%;�%;�Q�?����)�V�\�\�%;�%;�V�X�F�6�I��"�"�:�.����&�&�u�	�&�B�/�.�7��
�
�1�
2��L�L�"�"�6�V�"�<�3�
�
�
�1�
2��L�L�"�"�5�G�"�<�3�
2�	/�.��
2�
2��
2�
2�s$�1"F�2"F(�1"F4�F%	�(F1�4F=c���tjjddgdd�d�}Gd�d�}tjjd|�id�}|j|d	�y)
Nrar�)r�rM�r
Tc��eZdZd�Zy)�:UrlParseTestCase.test_urlencode_sequences.<locals>.Trivialc��y)N�trivial�rs r[�__str__zBUrlParseTestCase.test_urlencode_sequences.<locals>.Trivial.__str__�s�� rN)�__name__�
__module__�__qualname__rrrr[�Trivialr�s��
!rr	r	z	a=trivial)r?r@r�rK)rRrWr	s   r[�test_urlencode_sequencesz)UrlParseTestCase.test_urlencode_sequences�s\�����'�'�q�!�f�9�(E�t�L��	!�	!����'�'��g�i�(8�$�?�������-rc��tjjddi�}|j|d�tjjdditjj��}|j|d�tjjddidtjj��}|j|d	�y)
Nr	z
some valueza=some+valuezsome value/another)�	quote_viaza=some%20value%2Fanotherr�)�saferza=some%20value/another)r?r@r�rK�quoter�s  r[�test_urlencode_quote_viaz)UrlParseTestCase.test_urlencode_quote_via�s������'�'��l�(;�<�������0����'�'��.B�(C�28�,�,�2D�2D�(�F������!;�<����'�'��.B�(C�-0�F�L�L�<N�<N�(�P������!9�:rc��|jttjjd�tjj	d�}|j|d�tjj	d�}|j|d�tjj	ddz�}|j|ddz�tjj	d	d
z�}|j|dd
z�y)Nr*sarchaeological arcanazarchaeological%20arcanarr�Ai'�Asz/ i��zz%01/%20)r8r�r?r@�quote_from_bytesrKr�s  r[�test_quote_from_bytesz&UrlParseTestCase.test_quote_from_bytes�s������)�V�\�\�%B�%B�E�J����.�.�/G�H������!:�;����.�.�s�3�������$����.�.�t�F�{�;�������V��,����.�.�z�'�/A�B�������G�!3�4rc���tjjd�}|j|d�tjjd�}|j|d�y)Nz	abc%20defsabc defrr)r?r@�unquote_to_bytesrKr�s  r[�test_unquote_to_bytesz&UrlParseTestCase.test_unquote_to_bytes�sJ�����.�.�{�;�������,����.�.�r�2�������%rc���|jttjjdd��|jttjjdd��y)Nsfoorfr�r�)r�)r8r�r?r@rrs r[�test_quote_errorsz"UrlParseTestCase.test_quote_errors�sI�����)�V�\�\�%7�%7��#*�	�	,����)�V�\�\�%7�%7����Qrc��tjjd�}|j|jd�|j|j
d�tjjd�}|j|jd�|j|j
d�tjj
d�}|j|jd�|j|j
d�tjj
d�}|j|jd�|j|j
d�y)Nztel:+31-641044153�telz
+31-641044153ztel:+31641044153z+31641044153)r?r@rPrKrCrErA)rR�p1�p2s   r[�test_issue14072z UrlParseTestCase.test_issue14072�s���
�\�\�
"�
"�#6�
7��������E�*�������/�2�
�\�\�
"�
"�#5�
6��������E�*�������.�1�
�\�\�
"�
"�#6�
7��������E�*�������/�2�
�\�\�
"�
"�#5�
6��������E�*�������.�1rc��|jttjjd�|jttjjd�|jttjjd�|jttjjd�|jttjjd�|jttjjd�|jttjjd�|jttjjd�|jttjjd	�|jttjjd
�y)Nz&Scheme://user@[192.0.2.146]/Path?Queryz-Scheme://user@[important.com:8000]/Path?Queryz#Scheme://user@[v123r.IP]/Path?Queryz Scheme://user@[v12ae]/Path?QueryzScheme://user@[v.IP]/Path?Queryz Scheme://user@[v123.]/Path?QueryzScheme://user@[v]/Path?Queryz5Scheme://user@[0439:23af::2309::fae7:1234]/Path?QueryzJScheme://user@[0439:23af:2309::fae7:1234:2342:438e:192.0.2.146]/Path?QueryzScheme://user@]v6a.ip[/Path)r8r9r?r@rPrs r[�test_invalid_bracketed_hostsz-UrlParseTestCase.test_invalid_bracketed_hosts�s*�����*�f�l�l�&;�&;�=e�f����*�f�l�l�&;�&;�=l�m����*�f�l�l�&;�&;�=b�c����*�f�l�l�&;�&;�=_�`����*�f�l�l�&;�&;�=^�_����*�f�l�l�&;�&;�=_�`����*�f�l�l�&;�&;�=[�\����*�f�l�l�&;�&;�=t�u����*�f�l�l�&;�&;�>J�	K����*�f�l�l�&;�&;�=Z�[rc��tjjd�}|j|jd�|j|j
d�|j|jd�tjjd�}|j|jd�|j|j
d�|j|jd�tjjd�}|j|jd�|j|j
d�|j|jd�y)	Nz!scheme://user@[v6a.ip]/path?queryzv6a.ip�user�/pathz4scheme://user@[0439:23af:2309::fae7%test]/path?queryz0439:23af:2309::fae7%testzEscheme://user@[0439:23af:2309::fae7:1234:192.0.2.146%test]/path?queryz*0439:23af:2309::fae7:1234:192.0.2.146%test)r?r@rPrKrNrLrE)rRrr�p3s    r[�test_splitting_bracketed_hostsz/UrlParseTestCase.test_splitting_bracketed_hosts�s���
�\�\�
"�
"�#F�
G��������h�/�������f�-�������'�*�
�\�\�
"�
"�#Y�
Z��������&A�B�������f�-�������'�*�
�\�\�
"�
"�#j�
k��������&R�S�������f�-�������'�*rc�`�d}tjjd�}|jt|�5|j
ddd�tjj
d�}|jt|�5|j
ddd�y#1swY�TxYw#1swYyxYw)Nz3Port could not be cast to integer value as 'oracle'z%http://Server=sde; Service=sde:oracle)r?r@rAr\r9rOrP)rR�messagerrs    r[�!test_port_casting_failure_messagez2UrlParseTestCase.test_port_casting_failure_messages���G��
�\�\�
"�
"�#J�
K��
�
#�
#�J��
8��G�G�9��\�\�
"�
"�#J�
K��
�
#�
#�J��
8��G�G�9�
8�	9�
8��9�
8�s�
B�
B$�B!�$B-c��tjjd�}|j|jd�|j|j
d�|j|jd�tjjd�}|j|jd�|j|j
d�|j|jd�tjjd�}|j|jd�|j|j
d	�|j|jd
�tjjd�}|j|jd�|j|j
d�|j|jd
�y)Nz"tel:123-4;phone-context=+1-650-516rz123-4zphone-context=+1-650-516ztel:+1-201-555-0123z+1-201-555-0123rz"tel:7042;phone-context=example.com�7042zphone-context=example.comz%tel:863-1234;phone-context=+1-914-555z863-1234zphone-context=+1-914-555)r?r@rArKrCrErF)rRrs  r[�test_telurl_paramsz#UrlParseTestCase.test_telurl_paramssJ��
�\�\�
"�
"�#G�
H��������E�*�������'�*�������$>�?�
�\�\�
"�
"�#8�
9��������E�*�������"3�4�������B�'�
�\�\�
"�
"�#G�
H��������E�*�������&�)�������$?�@�
�\�\�
"�
"�#J�
K��������E�*�������*�-�������$>�?rc��tjjtjj�}|j	dt|��y)N�Quoter)r?r@�_Quoter�_ALWAYS_SAFE�assertIn�repr)rR�quoters  r[�test_Quoter_reprz!UrlParseTestCase.test_Quoter_repr*s2�����%�%�f�l�l�&?�&?�@���
�
�h��V��-rc�@�tjj�yr>)r?r@�clear_cachers r[�"test_clear_cache_for_code_coveragez3UrlParseTestCase.test_clear_cache_for_code_coverage.s����� � �"rc��	|jt�5tjj}ddd�y#1swYyxYwr>)r8�AttributeErrorr?r@�this_does_not_exist)rR�unuseds  r[�!test_urllib_parse_getattr_failurez2UrlParseTestCase.test_urllib_parse_getattr_failure1s.��C�
�
�
�~�
.��\�\�5�5�F�/�
.�
.�s	�;�Ac�D�g}hd�}ttj�D]T}|jd�s||vr�t	tj|�}t	|dd�dk(s�D|j|��V|j
tjj|�y)N>�unwrap�splittag�to_bytes�	splitattr�	splithost�	splitport�	splittype�	splituser�
ResultBase�
splitnport�
splitquery�
splitvaluer5�splitpasswdrbrzurllib.parse)�dirr?r@�
startswithr��append�assertCountEqual�__all__)rRr��undocumented�namer�s     r[�test_allzUrlParseTestCase.test_all6s�����
������%�D����s�#�t�|�';���V�\�\�4�0�F��v�|�T�2�n�D�����%�&�	
���f�l�l�2�2�H�=rc��d}|D�chc]}djt|����}}ttt	dt
j��D�cgc]L}tj|�r5|ttj|�j��zr||vr|��N}}|jd|�|jd|�tjjd�|jt �5tjjd�ddd�dD]�}d	D]�}|D]�}d
j||j|��}|j#|djt|����5|jt �5tjj|�ddd�ddd�������ycc}wcc}w#1swY��xYw#1swY�.xYw#1swY��xYw)Nz/:#?@z{:04X}�u℀u#uhttp://プ:80uhttp://プ︓80)r�r�r�)znetloc{}false.netloczn{}user@netlocz{}://{}/path)rS�char)�format�ord�map�chrra�sys�
maxunicode�unicodedata�
decomposition�setrUr0r?r@rPr8r9r�)rR�
illegal_charsr�	hex_chars�denorm_charsrCrDrSs        r[�test_urlsplit_normalizationz,UrlParseTestCase.test_urlsplit_normalizationFs��� �
�6C�D�m��X�_�_�S��V�,�m�	�D��3��c�3�>�>� :�;�
�;�!��(�(��+��S��!:�!:�1�!=�!C�!C�!E�F�F���&�
�;�	�
�	
�
�
�h��-��
�
�h��-�	�����6�7�
�
�
�z�
*��L�L�!�!�"?�@�+�/�F�D��%�A�(�/�/���
�
�a�8H�I�C����#�H�O�O�C��F�4K��L�!�.�.�z�:�"�L�L�1�1�#�6�;�M�L�&�E�/��#E��
�+�
*��;�:��M�L�s<�!G�AG�? G�G1	� G%�8G1	�G"�%G.�*G1	�1G:
r>):rrrr\rjrnr�r�r�r�r�rrr!r&r,r<rHrJr]rcrmrsrxr{r}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
rrrrrr r%r(r+r3r6r;rQrarrr[r<r<hs@��38�j7�7�e9�N?�B$=�LN�S�"A�`@�
%J�Z7B�r5&�n0N�d4�.M�[�z#t�J9D�v#�&;�$'*�RU�@�&@�$D�V�*
@�H�BL�0L�21�7�7�H�
R�*R�(U�
R�=�.�;�	5�&�R�

2�
\�+��@�*.�#�6�
>� 7rr<c�V�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�
Utility_Testsc�(�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�y)Nztype:opaquestring)rE�opaquestringre)Nre�
:opaquestring)Nrfztype:)rErztype:opaque:string)rEz
opaque:string)r?r@�
_splittyperK)rRrCs  r[�test_splittypezUtility_Tests.test_splittypehs����L�L�+�+�	�����#6�7�9Q�R�����>�2�4J�K�����?�3�5L�M�����7�+�\�:�����#7�8�:S�Trc��tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�|j|d�d�|j|d
�d�|j|d�d�|j|d�d�|j|d�d�y)Nz%//www.example.org:80/foo/bar/baz.html)�www.example.org:80�/foo/bar/baz.htmlz//www.example.org:80)rjrrk)Nrkz//127.0.0.1#@host.com)�	127.0.0.1�/#@host.comz//127.0.0.1#@host.com:80)rlz/#@host.com:80z//127.0.0.1:80#@host.com)z127.0.0.1:80rmz///file)rz/filez//example.net/file;)�example.netz/file;z//example.net/file?)rnz/file?z//example.net/file#)rnz/file#)r?r@�
_splithostrK)rRrAs  r[�test_splithostzUtility_Tests.test_splithostps���L�L�+�+�	�����#J�K�D�	F�����#9�:�3�	5�����#6�7�4�	6�	
����#:�;�5�	7�����#=�>�8�	:�����#=�>�8�	:�	
����9�-�&�	(�	
����#8�9�2�	4�����#8�9�2�	4�����#8�9�2�	4rc�(�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�y)NrO)�	User:Pass�www.python.org:080z@www.python.org:080)rrsrs)Nrsz
User:Pass@)rrrrT)zUser@example.com:Passrs)r?r@�
_splituserrK)rRrDs  r[�test_splituserzUtility_Tests.test_splituser�s����L�L�+�+�	�����#A�B�<�	>�����#8�9�3�	5�����#7�8�5�	7�����<�0�*�	,�����#M�N�H�	Jrc��tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�|j|d�d�|j|d
�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�y)Nzuser:ab)r"�abzuser:a
b)r"za
bzuser:a	b)r"za	bzuser:a
b)r"za
bzuser:ab)r"zabzuser:ab)r"zabzuser:a:b)r"za:bzuser:a b)r"rz	user 2:ab)zuser 2rwz
user+1:a+b)zuser+1za+bzuser:)r"rr")r"Nz:ab)rrw)r?r@�_splitpasswdrK)rRrIs  r[�test_splitpasswdzUtility_Tests.test_splitpasswd�s+���l�l�/�/������Y�/��@�����[�1�3C�D�����[�1�3C�D�����[�1�3C�D�����[�1�3C�D�����[�1�3C�D�����Z�0�/�B�����Z�0�/�B�����[�1�3C�D�����\�2�4E�F�����W�-�|�<�����V�,�n�=�����U�+�Z�8rc��tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d	�|j|d
�d�|j|d�d
�|j|d�d�y)N�	parrot:88)�parrot�88r|�r|N�parrot:rl)rlN�
parrot:cheese)r�Nz[::1]:88)�[::1]r}r�)r�Nz:88)rr})r?r@�
_splitportrK)rRrBs  r[�test_splitportzUtility_Tests.test_splitport�s����L�L�+�+�	�����;�/�1A�B�����8�,�.>�?�����9�-�/?�@�����;�/�1D�E�����?�3�5L�M�����:�.��@�����7�+�_�=�����5�)�:�6rc� �tjj}|j|d�d�|j|d�d�|j|dd�d�|j|d�d�|j|dd�d�|j|d�d	�|j|dd�d
�|j|d�d�|j|dd�d�|j|d
�d�y)Nr{)r|rgr|)r|����7)r|r�rrl)rlr�)rlr�r�r~z
parrot: +1_0 )r?r@�_splitnportrK)rRrFs  r[�test_splitnportzUtility_Tests.test_splitnport�s����\�\�-�-�
�����K�0�.�A�����H�-�~�>�����H�b�1�>�B�����I�.��?�����I�r�2�N�C�����K�0�2C�D�����K��4�6G�H�����O�4�6F�G�����O�R�8�:J�K�����O�4�6F�Grc��tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�y)	N�http://python.org/fake?foo=bar)�http://python.org/fake�foo=barzhttp://python.org/fake?foo=bar?)r�rr�)r�Nz?foo=bar)rr�)r?r@�_splitqueryrK)rRrGs  r[�test_splitqueryzUtility_Tests.test_splitquery�su���\�\�-�-�
�����$D�E�>�	@�����$E�F�?�	A�����$<�=�9�	;�����J�/��Arc�(�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�y)N�http://example.com?foo=bar#baz)�http://example.com?foo=bar�bazzhttp://example.com?foo=bar#)r�rz#baz)rr�r�)r�Nz"http://example.com?foo=bar#baz#boo)r��boo)r?r@�	_splittagrK)rRr>s  r[�
test_splittagzUtility_Tests.test_splittag�s����<�<�)�)������"B�C�>�	@�����"?�@�;�	=�����&�)�;�7�����">�?�=�	?�����"F�G�B�	Drc��tjj}|j|d�dddgf�|j|d�ddgf�|j|d�dddgf�|j|d�dgf�y)Nz/path;attr1=value1;attr2=value2r#zattr1=value1zattr2=value2z/path;rz;attr1=value1;attr2=value2)r?r@�
_splitattrrK)rRr@s  r[�test_splitattrzUtility_Tests.test_splitattr�s����L�L�+�+�	�����#D�E�!�N�N�#C�D�	F�����8�,�w���o�>�����#?�@��~�~�>�?�	A�����7�+�g�r�]�;rc�(�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�y)Nr�)r*�barzfoo=)r*rz=bar)rr��foobar)r�Nzfoo=bar=baz)r*zbar=baz)r?r@�_splitvaluerK)rRrHs  r[�test_splitvaluezUtility_Tests.test_splitvalue�s~���\�\�-�-�
�����I�.��?�����F�+�[�9�����F�+�[�9�����H�-�/?�@�����M�2�4F�Grc���tjjd�}|j|d�|j	t
tjjd�y)Nzhttp://www.python.orguhttp://www.python.org/mediæval)r?r@�	_to_bytesrKr8�UnicodeErrorr�s  r[�
test_to_byteszUtility_Tests.test_to_bytes�sH�����'�'�(?�@������!8�9����,����(>�(>�?�	Arc�t�dD]3}tjj|�}|j|d��5y)N)z<URL:scheme://host/path>z<scheme://host/path>zURL:scheme://host/path�scheme://host/pathr�)r?r@r=rK)rR�wrapped_urlrSs   r[�test_unwrapzUtility_Tests.test_unwrap�s5��L�K��,�,�%�%�k�2�C����S�"6�7�LrN)rrrrhrpruryr�r�r�r�r�r�r�r�rrr[rcrcdsH��G�U�4�:J�9�$	7�H�
B�
D�<�H�A�8rrcc�T�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�DeprecationTestc�*�|jt�5}tjj}|j|tjj�ddd�|jdtj��y#1swY�/xYw)NzQuoter will be removed)
�assertWarns�DeprecationWarningr?r@r-r�r.r0�str�warning)rR�cm�	old_classs   r[�test_Quoter_deprecationz'DeprecationTest.test_Quoter_deprecation�sa��
�
�
�0�
1�R����+�+�I��M�M�)�V�\�\�%9�%9�:�2�	
�
�
�.��B�J�J��@�2�
1�s�AB	�	Bc���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rCrKr�r��rRr�s  r[�test_splittype_deprecationz*DeprecationTest.test_splittype_deprecation�Q��
�
�
�0�
1�R��L�L�"�"�2�&�2�����R�Z�Z��?�	@�2�
1��� A$�$A-c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rArKr�r�r�s  r[�test_splithost_deprecationz*DeprecationTest.test_splithost_deprecationr�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rDrKr�r�r�s  r[�test_splituser_deprecationz*DeprecationTest.test_splituser_deprecationr�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rIrKr�r�r�s  r[�test_splitpasswd_deprecationz,DeprecationTest.test_splitpasswd_deprecationsQ��
�
�
�0�
1�R��L�L�$�$�R�(�2�����R�Z�Z��?�	@�2�
1�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rBrKr�r�r�s  r[�test_splitport_deprecationz*DeprecationTest.test_splitport_deprecation r�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rFrKr�r�r�s  r[�test_splitnport_deprecationz+DeprecationTest.test_splitnport_deprecation'�Q��
�
�
�0�
1�R��L�L�#�#�B�'�2�����R�Z�Z��?�	@�2�
1�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@rGrKr�r�r�s  r[�test_splitquery_deprecationz+DeprecationTest.test_splitquery_deprecation.r�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@r>rKr�r�r�s  r[�test_splittag_deprecationz)DeprecationTest.test_splittag_deprecation5sQ��
�
�
�0�
1�R��L�L�!�!�"�%�2�����R�Z�Z��?�	@�2�
1�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r?r@r@rKr�r�r�s  r[�test_splitattr_deprecationz*DeprecationTest.test_splitattr_deprecation<r�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)NrzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() instead)r�r�r?r@rHrKr�r�r�s  r[�test_splitvalue_deprecationz+DeprecationTest.test_splitvalue_deprecationCsR��
�
�
�0�
1�R��L�L�#�#�B�'�2�����R�Z�Z��@�	A�2�
1�r�c���|jt�5}tjj	d�ddd�|jt
j�d�y#1swY�/xYw)Nrz/urllib.parse.to_bytes() is deprecated as of 3.8)r�r�r?r@r?rKr�r�r�s  r[�test_to_bytes_deprecationz)DeprecationTest.test_to_bytes_deprecationJsO��
�
�
�0�
1�R��L�L�!�!�"�%�2�����R�Z�Z��J�	L�2�
1�r�N)rrrr�r�r�r�r�r�r�r�r�r�r�r�rrr[r�r��sJ��A�@�@�@�@�@�@�@�@�@�A�Lrr��__main__)rYr[�unittest�urllib.parser?rr r%r+rbrl�TestCaser<rcr�r�mainrrr[�<module>r�s���
����%��#��#����
)���H�)��"�I�)�
�2�J�)�	�8�*��	)�

�I�;��)�	�9�+��
)�
�I�;��)�
�|�n��)�����)���Z�(�)�)��>�"�#�)��j�\��)��\�<�0�1�)���Z�(�)�)�	�"�I�)� 
�2�J�!)�"�B�K�#)�$
�J�<��%)�&�[�M��')�(
�K�=��))�*�[�M��+)�,��� �-)�.�.�!�"�/)�0�,��-�.�1)�2�$�%�&�3)�4
�|�n��5)�6�n�n�5�6�7)�8�,��-�.�9)�:�k�]��;)�<�'�(�)�=)�>
�}�o��?)�@�*�+�,�A)�D�'�(�)�E)�F�)�*�+�G)�H�%�&�'�I)�J�6�7�8�K)�L�2�3�4�M)�N�&�'�(�O)�P�$�%�&�Q)��\*���H�*��"�I�*�
�2�J�*�	�2��t�*��	*�

�B���;��*�	�3���+��
*�
�C�"��;��*�
�s�U�G�n��*�������*��s�e�3�%�(�)�*��3��	�"�#�*��c�C�5�\��*��5�'���0�1�*���s�C�j�!�"�*�	�"�I�*� 
�2�J�!*�"�B�K�#*�$
�C�#��<��%*�&�S�4�&�M��'*�(
�D�3�%�=��)*�*�T�C�5�M��+*�,��v�h�� �-*�.�&�4�&�!�"�/*�0���t�f�-�.�1*�2�D�8�*�%�&�3*�4
�t�d�V�n��5*�6�V�H�V�H�5�6�7*�8�$��t��%�&�9*�:�d�S�E�]��;*�<�S�;�-�(�)�=*�>
�u�t�f�o��?*�@�d�\�?�+�,�A*�B��0�1�2�3�C*�F�X��x�(�)�G*�H�x�&��*�+�I*�J��H�:�&�'�K*�L�K�+��7�8�M*�N��k�]�3�4�O*�P�G�g�Y�'�(�Q*�R�'�G�9�%�&�S*��Xz7�x�(�(�z7�x'U8�H�%�%�U8�pRL�h�'�'�RL�j�z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists