Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_urlparse.cpython-39.pyc

a

��g��@sHddlZddlZddlZddlZdZdZdZdZdgfdgfdgfdd	gfd
dgfdd
gfdd
gfddgfdddgfdddgfdgfdgfdgfddgfddgfddgfd dgfd!d"gfd#d$d%gfd&d'd(gfd)d*gfd+d,gfd-d.gfd/d0gfgZ	difdifdifdddgifd
ddgifdddgifdddgifddd1gifdd2gd3gd�fddd4d5gifdifdifdifdddgifdddgifdddgifd ddgifd!dd6gifd#d7gd8gd"�fd&dd9d:gifd)d;d1gifd+dd<gifd-d=d6gifd/dd>gifgZ
Gd?d@�d@ej�ZGdAdB�dBej�Z
GdCdD�dDej�ZedEk�rDe��dS)F�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)rrza=z&a=b�r�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=s&a=b�r�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 cr
rrrrrrrrr r"r$r&r(c@s�eZdZdddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d`da�Z2dbdc�Z3dS)e�UrlParseTestCaseNc	Csl|dur|}tj�|�}|�||�|j|j|j|j|j|j	f}|�||�tj�
|�}|�||�|�||���tj�|���}|�|��|���|�||�|�|j|j�|�|j|j�|�|j|j�|�|j|j�|�|j|j�|�|j	|j	�|�|j|j�|�|j
|j
�|�|j|j�|�|j|j�tj�|�}|�||�|j|j|j|j|j	f}|�||�tj�|�}|�||�|�||���tj�|���}|�|��|���|�||�|�|j|j�|�|j|j�|�|j|j�|�|j|j�|�|j	|j	�|�|j|j�|�|j
|j
�|�|j|j�|�|j|j�dS�N)�urllib�parse�urlparse�assertEqual�scheme�netloc�path�params�query�fragment�
urlunparse�geturl�username�password�hostname�port�urlsplit�
urlunsplit)	�self�url�parsed�split�url2�result�tZresult2Zresult3�rD�./usr/local/lib/python3.9/test/test_urlparse.py�checkRoundtripsIsZ��z UrlParseTestCase.checkRoundtripscCsdtD]Z\}}tjj|dd�}|�||d|�dd�|D�}tjj|dd�}|�||d|�qdS)NT��keep_blank_values�Error parsing %rcSsg|]}t|d�r|�qS)���len��.0�vrDrDrE�
<listcomp>�rz-UrlParseTestCase.test_qsl.<locals>.<listcomp>F)�parse_qsl_test_casesr+r,�	parse_qslr.)r=�orig�expectrB�expect_without_blanksrDrDrE�test_qsl~s�zUrlParseTestCase.test_qslcshtD]^\}�tjj|dd�}|�|�d|��fdd��D�}tjj|dd�}|�||d|�qdS)NTrGrIcs&i|]}t�|d�r|�|�qS)rrKrM�rTrDrE�
<dictcomp>�s�z,UrlParseTestCase.test_qs.<locals>.<dictcomp>F)�parse_qs_test_casesr+r,�parse_qsr.)r=rSrBrUrDrWrE�test_qs�s
��zUrlParseTestCase.test_qscsHgd�}dd���fdd�|D�}||D]\}}}|�|||�q*dS)N))�path/to/file)rrr\rrr)rrr\rr)�
/path/to/file�rrr]rrr�rrr]rr)�//path/to/file)rr1�/to/filerrr)rr1rarr)z////path/to/file)rrr`rrr)rrr`rr)zscheme:path/to/file)r/rr\rrr)r/rr\rr)�scheme:/path/to/file�r/rr]rrr�r/rr]rr)zscheme://path/to/file)r/r1rarrr)r/r1rarr)zscheme:////path/to/file)r/rr`rrr)r/rr`rr)�file:///tmp/junk.txt��filer�
/tmp/junk.txtrrr�rgrrhrr)zfile:////tmp/junk.txt)rgr�//tmp/junk.txtrrr)rgrrjrr)zfile://///tmp/junk.txt)rgr�///tmp/junk.txtrrr)rgrrkrr)zimap://mail.python.org/mbox1)�imap�mail.python.org�/mbox1rrr)rlrmrnrr)z1mms://wms.sys.hinet.net/cts/Drama/09006251100.asf)�mms�wms.sys.hinet.net�/cts/Drama/09006251100.asfrrr)rorprqrr)znfs://server/path/to/file.txt)�nfs�server�/path/to/file.txtrrr)rrrsrtrr)z0svn+ssh://svn.zope.org/repos/main/ZConfig/trunk/)�svn+ssh�svn.zope.org�/repos/main/ZConfig/trunk/rrr)rurvrwrr)z)git+ssh://git@github.com/user/project.git)�git+ssh�git@github.com�/user/project.gitrrr)rxryrzrrcSs8|d�d�tdd�|dD��tdd�|dD��fS)Nr�asciicss|]}|�d�VqdS�r{N��encode�rN�xrDrDrE�	<genexpr>�rzDUrlParseTestCase.test_roundtrips.<locals>._encode.<locals>.<genexpr>rJcss|]}|�d�VqdSr|r}rrDrDrEr��r��r~�tuple�rCrDrDrE�_encode�s�z1UrlParseTestCase.test_roundtrips.<locals>._encodecsg|]}�|��qSrDrDr�r�rDrErP�rz4UrlParseTestCase.test_roundtrips.<locals>.<listcomp>�rF)r=�	str_cases�bytes_casesr>r?r@rDr�rE�test_roundtrips�s
8z UrlParseTestCase.test_roundtripscsLgd�}dd���fdd�|D�}||D]\}}}}|�||||�q*dS)N))z///path/to/filer]r^r_)zscheme:///path/to/filerbrcrd)zfile:/tmp/junk.txtrerfri)zhttp:/tmp/junk.txtzhttp:///tmp/junk.txt)�httprrhrrr)r�rrhrr)zhttps:/tmp/junk.txtzhttps:///tmp/junk.txt)�httpsrrhrrr)r�rrhrrcSsD|d�d�|d�d�tdd�|dD��tdd�|dD��fS)	Nrr{rJcss|]}|�d�VqdSr|r}rrDrDrEr��rzRUrlParseTestCase.test_roundtrips_normalization.<locals>._encode.<locals>.<genexpr>r�css|]}|�d�VqdSr|r}rrDrDrEr��r�r�r�rDrDrEr��s
�z?UrlParseTestCase.test_roundtrips_normalization.<locals>._encodecsg|]}�|��qSrDrDrr�rDrErP�rzBUrlParseTestCase.test_roundtrips_normalization.<locals>.<listcomp>r�)r=r�r�r>rAr?r@rDr�rE�test_roundtrips_normalization�s
z.UrlParseTestCase.test_roundtrips_normalizationc
s�gd�}dd���fdd�|D�}d}d}||f}||f}||fD]L\}}|D]>}	|D]4\}
}}|	|
}
|	f|}|	f|}|�|
||�qVqNqBdS)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)rz/b/c/d�p�q�f)rz/b/c/d;pr�r�cSs8|d�d�tdd�|dD��tdd�|dD��fS)Nrr{css|]}|�d�VqdSr|r}rrDrDrEr�	rzIUrlParseTestCase.test_http_roundtrips.<locals>._encode.<locals>.<genexpr>rJcss|]}|�d�VqdSr|r}rrDrDrEr�
rr�r�r�rDrDrEr�s�z6UrlParseTestCase.test_http_roundtrips.<locals>._encodecsg|]}�|��qSrDrDrr�rDrErPrz9UrlParseTestCase.test_http_roundtrips.<locals>.<listcomp>)r�r�)�http�httpsr�)
r=r�r�Zstr_schemesZ
bytes_schemesZ	str_testsZbytes_testsZschemesZ
test_casesr/r>r?r@rDr�rE�test_http_roundtrips�s

z%UrlParseTestCase.test_http_roundtripsc	CsR|||f}|�tj�||�|�dd�|D�}\}}}|�tj�||�|�dS)NcSsg|]}|�d��qS�r{r}rrDrDrErPsz.UrlParseTestCase.checkJoin.<locals>.<listcomp>)r.r+r,�urljoin)	r=�baseZrelurl�expectedZstr_componentsZbytes_componentsZbasebZrelurlbZ	expectedbrDrDrE�	checkJoins
�zUrlParseTestCase.checkJoincCs`gd�}dd�|D�}||D]<}|�tj�tj�|��|�|�tj�tj�|��|�qdS)N)�Pythonz./Python�x-newscheme://foo.com/stuffzx://yzx:/yzx:/r�cSsg|]}|�d��qSr�r}rrDrDrErP!rz7UrlParseTestCase.test_unparse_parse.<locals>.<listcomp>)r.r+r,r<r;r5r-)r=r�r��urDrDrE�test_unparse_parses
z#UrlParseTestCase.test_unparse_parsecCs�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�td	d
�|�tdd�|�td
d�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�td d�|�td!d"�|�td#d$�|�td%d$�|�td&d�|�td'd(�|�td)d*�|�td+d,�|�td-d.�|�td/d0�|�td1d"�|�td2d�|�td3d4�|�td5d6�dS)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�r=rDrDrE�test_RFC1808&s>zUrlParseTestCase.test_RFC1808cCs|�tj�d�d�dS)Nzmailto:1337@example.org)�mailtorz1337@example.orgrrr�r.r+r,r-r�rDrDrE�test_RFC2368Vs�zUrlParseTestCase.test_RFC2368cCs�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�td	d
�|�tdd�|�td
d�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd �|�td!d �|�td"d�|�td#t�|�td$d%�|�td&d'�|�td(d)�|�td*d+�|�td,d�|�td-d�|�td.d/�|�td0d1�|�td2d3�|�td4d5�|�td6d7�|�td8d9�|�td:d;�|�td<d=�dS)>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�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r��	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_BASEr�rDrDrE�test_RFC2396[sFzUrlParseTestCase.test_RFC2396cCs�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�td	d
�|�tdd�|�td
d�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�td d!�|�td"d!�|�td#d$�|�td%d&�|�td'd&�|�td(d�|�td)d�|�td)d�|�td*d�|�td+d�|�td,d�|�td-d.�|�td/d0�|�td1d2�|�td3d4�|�td5d$�|�td6d
�|�td7d8�|�td9d:�|�td;d<�|�td=d>�|�td?d@�|�tdAdB�|�tdCdD�|�tdEdF�|�tdGd�|�dHdd�dS)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�r�r�z
../../../gz
../../../../gz/./gz/../gr�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��http:gzhttp://a/b/c/de)r��RFC3986_BASEr�rDrDrE�test_RFC3986�s\zUrlParseTestCase.test_RFC3986cCsX|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd	�|�td
d�|�tdd
�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�tdd�|�td d	�|�td!d"�|�td#d$�|�tdd�|�tdd�|�td%d�|�td&d�|�td'd�|�d(dd(�|�d)dd�|�d)d*d*�|�d+d,d-�|�d.d,d/�|�d0dd1�|�d2dd3�|�td4d5td6�|�d7d8d9�|�d:d8d;�|�d7d<d=�|�d:d<d=�|�d7d>d?�|�dd8d=�|�d@dAdA�dS)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�r�r�r�r�r�r�r�zhttp:?yzhttp:g?yzhttp:g?y/./xzhttp:///rzhttp://a/./gzsvn://pathtorepo/dir1Zdir2zsvn://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/grr
)r��SIMPLE_BASEr�rDrDrE�
test_urljoins�sTzUrlParseTestCase.test_urljoinscs�gd�}dd���fdd�|D�}||D].\}}}tj�|�}|�|j|jf||f�q*gd�}dd�|D�}||D]}|�ttjj|�qxdS)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/r�N)zhttp://[::1]/foo/r�N)zhttp://[dead:beef::1]/foo/r�N)zhttp://[dead:beef::]/foo/r�N)z5http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/r�N)zhttp://[::12.34.56.78]/foo/r�N)z http://[::ffff:12.34.56.78]/foo/r�N)zhttp://Test.python.org:/foo/r�N)zhttp://12.34.56.78:/foo/r�N)zhttp://[::1]:/foo/r�N)zhttp://[dead:beef::1]:/foo/r�N)zhttp://[dead:beef::]:/foo/r�N)z6http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:/foo/r�N)zhttp://[::12.34.56.78]:/foo/r�N)z!http://[::ffff:12.34.56.78]:/foo/r�NcSs"|d�d�|d�d�|dfS)Nrr{rJr�r}r�rDrDrEr�sz.UrlParseTestCase.test_RFC2732.<locals>._encodecsg|]}�|��qSrDrDrr�rDrErPrz1UrlParseTestCase.test_RFC2732.<locals>.<listcomp>)zhttp://::12.34.56.78]/zhttp://[::1/foo/zftp://[::1/foo/bad]/badzhttp://[::1/foo/bad]/badzhttp://[::ffff:12.34.56.78cSsg|]}|�d��qSr�r}rrDrDrErP&r)r+r,r-r.r9r:�assertRaises�
ValueError)r=r�r�r>r9r:Z	urlparsedZinvalid_urlrDr�rE�test_RFC2732�s zUrlParseTestCase.test_RFC2732cs�ddddddddtd	d
ftd	dfg
}dd
���fdd�|D�}||D]R\}}}tj�|�}|�|��|�|�|||f�|�|j|�|�|j|�qFdS)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�)r�r�r)zhttp://python.org/p#fragzhttp://python.org/pr�)�http://python.org/p?qr�rrr�rcSst|�dd�|D��S)Ncss|]}|�d�VqdSr|r}rrDrDrEr�8rzCUrlParseTestCase.test_urldefrag.<locals>._encode.<locals>.<genexpr>)�typer�rDrDrEr�7sz0UrlParseTestCase.test_urldefrag.<locals>._encodecsg|]}�|��qSrDrDrr�rDrErP9rz3UrlParseTestCase.test_urldefrag.<locals>.<listcomp>)	r�r�r+r,�	urldefragr.r6r>r4)r=r�r�r>�defragr�rBrDr�rE�test_urldefrag*s&�zUrlParseTestCase.test_urldefragcCsTtj�d�}|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�dS)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,r;r.r9r0)r=r�rDrDrE�test_urlsplit_scoped_IPv6Asz*UrlParseTestCase.test_urlsplit_scoped_IPv6cCsd}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd�|�|jd�|�|�
�dd�|dd��d	}tj�|�}|�|jd�|�|jd
�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d
�|�|jd�|�|jd�|�|�
�|�d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d
�|�|jd�|�|jd�|�|�
�|�d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd�|�|jd�|�|�
�dd�|dd��d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd�|�|jd�|�|�
�|�d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d �|�|j
d�|�|jd�|�|jd�|�|�
�|�d!}tj�|�}|�td"��|jWd�n1�s0YdS)#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,r;r.r/r0r1r3r4r7r8r9r:r6�assertRaisesRegexr�)r=r>r�rDrDrE�test_urlsplit_attributesJs�  z)UrlParseTestCase.test_urlsplit_attributescCs�d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd�|�|jd�|�|�
�d�d}tj�|�}|�|jd	�|�|jd
�|�|jd�|�|jd�|�|jd
�|�|j	d�|�|j
d�|�|jd
�|�|jd�|�|�
�d�d}d}td�D]4}tjj||d�}|�|jd�|�|�
�d��qLdS)NzQhttp	://www.python
.org	/java
script:	alert('msg
')/?query
=	something#frag
mentr�r�z/javascript:alert('msg')/zquery=somethingr4zGhttp://www.python.org/javascript:alert('msg')/?query=something#fragmentsQhttp	://www.python
.org	/java
script:	alert('msg
')/?query
=	something#frag
mentr�rs/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��r/)r+r,r;r.r/r0r1r3r4r7r8r9r:r6�range)r=r>r�r/�_rDrDrE�!test_urlsplit_remove_unsafe_bytes�s<z2UrlParseTestCase.test_urlsplit_remove_unsafe_bytescCsVttdd��}d}|�d�|}tj�|�}|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd	�|�|jd
�|�|j
d�|�|jd�|�|jd
�|�|��|�||�d�}tj�|�}|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd�|�|jd�|�|j
d�|�|jd�|�|jd
�|�|��|�d��d}tj�|�d�|�}|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jd�|�|��|�tj�d�}|�tj�|�d�d}|�d�d|�d�}td�D]4}tjj||d�}|�|jd�|�|��d��qdS) Nr�!r�utf-8r�rrr	r�r
rr�rr�rrrrrrrz)https://www.python.org:88/doc/?query=    r�zwww.python.org:88z
query=    �Xz
www.pypi.org z//www.python.org/r�rzhttps://www.python.org/)�bytesr�decoder+r,r;r.r/r0r1r3r4r7r8r9r:r6r~r<)r=ZnoiseZbase_urlr>r�Zquery_spaces_urlr/rrDrDrE�test_urlsplit_strip_url�sTz(UrlParseTestCase.test_urlsplit_strip_urlcCs�dD]�}tjjtjjfD]�}dD]�}|j|||d���d|}d|d}|rb|�d�}|�d�}||�}|�|j|�|�t	��|j
Wd�n1s�0YWd�q 1s�0Yq qqdS)	z Check handling of invalid ports.)FT)r�z1.5z-1Z0x10)rr,r:zwww.example.net:zhttp://r�r{N)r+r,r;r-�subTestr~r.r0r�r�r:)r=rr,r:r0r>r�rDrDrE�test_attributes_bad_ports

z)UrlParseTestCase.test_attributes_bad_portcCs�d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|�	�|�tj�
|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|�	�|�d}tj�|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|�	�|�tj�
|�}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|�	�|�dS)Nz0sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15rs0sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15r)r+r,r;r.r0r7r8r9r:r6r-)r=Zurir�rDrDrE�test_attributes_without_netlocs<z/UrlParseTestCase.test_attributes_without_netloccCs,|�tj�d�d�|�tj�d�d�dS)Nz http://example.com?blahblah=/foo)r�zexample.comrrz
blahblah=/foors http://example.com?blahblah=/foo)r�sexample.comrrs
blahblah=/foorr�r�rDrDrE�test_noslash@s��zUrlParseTestCase.test_noslashcCs||�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d	�d
�|�tj�d�d�dS)
Nr1)rrr1rrrz//www.python.org:80)r�www.python.org:80rrrr�http://www.python.org:80�r�r&rrrr�path)rrr)rrrs//www.python.org:80)r�www.python.org:80rrrr�http://www.python.org:80�r�r*rrrrr�r�rDrDrE�test_withoutschemeGs$������z#UrlParseTestCase.test_withoutschemecCs�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d	�d
�|�tj�d�d�|�tj�d
�d�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d�d�dS)Nzhttp:80)r�r�80rrrzhttps:80)r�rr.rrrzpath:80)r1rr.rrrr�)r�rrrrrzhttps:)r�rrrrrr'r(shttp:80)r�r�80rrrshttps:80)r�rr/rrrspath:80)r)rr/rrrshttp:)r�rrrrrshttps:)r�rrrrrr+r,r�r�rDrDrE�test_portseparatorZs ��z#UrlParseTestCase.test_portseparatorcCs|�ttjjd�dS)Nr�)r��	TypeErrorr+r,�	urlencoder�rDrDrE�
test_usingsyslszUrlParseTestCase.test_usingsyscCs�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d�d�|�tj�d	�d
�|�tj�d�d�|�tj�d
�d�|�tj�d�d�dS)Nzs3://foo.com/stuff)Zs3�foo.com�/stuffrrrr�)�x-newschemer4r5rrrz*x-newscheme://foo.com/stuff?query#fragment)r6r4r5rr3r4z!x-newscheme://foo.com/stuff?query)r6r4r5rr3rss3://foo.com/stuff)ss3�foo.com�/stuffrrrsx-newscheme://foo.com/stuff)�x-newschemer7r8rrrs*x-newscheme://foo.com/stuff?query#fragment)r9r7r8r�queryrs!x-newscheme://foo.com/stuff?query)r9r7r8rr:rr�r�rDrDrE�test_anyschemeps0��������zUrlParseTestCase.test_anyschemec	Cs�tjjtjjfD]�}|j|d���|dd�}|�|jd�|dd�}|�|jd�|�|dd�jd�|�|ddd	�jd�|�|d
dd	�jd�|�|d�jd�|�|d
�jd�|�|d
d�jd�Wd�q1s�0YqdS)
N)�functionzhttp://example.net/�ftpr�shttp://example.net/sftpr�r1rr)rr)r+r,r-r;r"r.r/)r=�funcrBrDrDrE�test_default_scheme�s

z$UrlParseTestCase.test_default_schemec
Csd}|D�]
\}}}tjjtjjfD]�}|dkr@|tjjur@d}|j||d���||dd�}|�|jd�|�t||��	d|��|�||dd�jd�||d	d�}|�|j|�|�
t||��	|��|�||dd	�j|�|�||�j|�Wd�q$1�s0Yq$qdS)
N)
)z
http:#fragr1r�)z//example.net#fragr1r�)zindex.html#fragr1r�)z	;a=b#fragr2r�)z	?a=b#fragr3r�)z#fragr1r�)z	abc#@fragr1�@frag)z//abc#@fragr1r@)z//abc:80#@fragr1r@)z//abc#@frag:80r1z@frag:80r2r1)r>r<F)�allow_fragmentsr�#T)r+r,r-r;r"r.r4Z
assertTrue�getattr�endswithZassertFalse)r=Ztestsr>�attrZ
expected_fragr>rBrDrDrE�test_parse_fragments�s*���z%UrlParseTestCase.test_parse_fragmentscCsL|�td��tj�dd�Wd�n1s00Y|�td��tj�dd�Wd�n1sj0Y|�td��tj�dd�Wd�n1s�0Y|�td��tj�dd�Wd�n1s�0Y|�td��tj�d�Wd�n1�s0Y|�td��tj�d�Wd�n1�sR0Y|�td��tj�d�Wd�n1�s�0Y|�td��tj�d	�Wd�n1�s�0Y|�td��tj�d
d�Wd�n1�s0Y|�td��tj�dd
�Wd�n1�s>0YdS)NzCannot mix strr�r�rr�)r�r�rrrr)r�rrrrr)r�r�rrr)r�rrrrr�shttp://python.org)	rr1r+r,r-r;r5r<r�r�rDrDrE�test_mixed_types_rejected�s(,,,,,,,,.z*UrlParseTestCase.test_mixed_types_rejectedc
Cs:t|j�}|j}|�|j|�d|}d|}||�}||�}d}d}	|�||�|�|��|�|�|��|�|�|�|�|�|�|�|�|�|�|�||	�|�|�|�||	�|�|�||�|�|��|�|�|��|�|�|�|�|�|�|�|�|�|�|�||	�|�|�|�||	�|�dS)N)r)rr{�strict)rL�_fields�_encoded_counterpartZassertIs�_decoded_counterpartr.r r~)
r=Zstr_typeZnum_argsZ
bytes_typeZstr_argsZ
bytes_argsZ
str_resultZbytes_result�encoding�errorsrDrDrE�_check_result_type�s.
z#UrlParseTestCase._check_result_typecCs.tjjtjjtjjg}|D]}|�|�qdSr*)r+r,�DefragResult�SplitResult�ParseResultrN)r=Zresult_typesZresult_typerDrDrE�test_result_pairs�s�z"UrlParseTestCase.test_result_pairscCs�tjjddd�}|�|ddgi�tjjddd�}|�|ddgi�tjjddd�}|�|dd	gi�tjjd
dd�}|�|ddgi�tjjd
ddd
�}|�|ddgi�dS)N�	key=Ł%E9�latin-1�rL�key�Łé�key=Ł%C3%A9rr{�Ł���
key=Ł%E9-�Ł�-�ignore�rLrM�Ł-)r+r,rZr.�r=rBrDrDrE�test_parse_qs_encoding�s
�z'UrlParseTestCase.test_parse_qs_encodingcCs�tjjddd�}|�|dg�tjjddd�}|�|dg�tjjddd�}|�|dg�tjjd	dd�}|�|d
g�tjjd	ddd�}|�|d
g�dS)NrSrTrU)rVrWrXrr{)rVrYrZ)rVr[r\r])rVr^)r+r,rRr.r_rDrDrE�test_parse_qsl_encoding�s
�z(UrlParseTestCase.test_parse_qsl_encodingcCsf|�t��,tjjd�dgd�dd�Wd�n1s<0Ytjjd�dgd�dd�dS)Nrza=a��
)�max_num_fields)r�r�r+r,rZ�joinr�rDrDrE�test_parse_qsl_max_num_fields
s:z.UrlParseTestCase.test_parse_qsl_max_num_fieldsc
Cs�difdifdddgifddgdgd	�fd
dddgifd
ifdifdddgifddgdgd�fddddgifg
}|D]�\}}|�d|�d|����Ttjj|dd�}|�||d|�tjj|d
d�}|�||d|�Wd�qt1s�0YqtdS)N�;�;;r!rr
r#rrr	�a=1;a=2rr�;�;;r%rrr'rrr�a=1;a=2rr �
Original: �, Expected: ��	separatorrI)r"r+r,rZr.)r=Zparse_qs_semicolon_casesrSrTrB�result_bytesrDrDrE�test_parse_qs_separators"�z(UrlParseTestCase.test_parse_qs_separatorcCs�dgfdgfddgfdddgfdd	d
gfdgfdgfd
dgfdddgfdddgfg
}|D]�\}}|�d|�d|����Ttjj|dd�}|�||d|�tjj|dd�}|�||d|�Wd�qX1s�0YqXdS)Nrgrhr!r	r#rr
rirrrjrkr%rr'rrrlrrrmrnrorI)r"r+r,rRr.)r=Zparse_qsl_semicolon_casesrSrTrBrqrDrDrE�test_parse_qsl_separator$s"



�z)UrlParseTestCase.test_parse_qsl_separatorcCsdtj�ddgdd�d�}t|�d��hd�ks2J�Gdd	�d	�}tj�d
|�id�}|�|d�dS)NrJr�)r�r�r	Tr>za=2zb=4za=1zb=3zb=5c@seZdZdd�ZdS)z:UrlParseTestCase.test_urlencode_sequences.<locals>.TrivialcSsdS)NZtrivialrDr�rDrDrE�__str__AszBUrlParseTestCase.test_urlencode_sequences.<locals>.Trivial.__str__N)�__name__�
__module__�__qualname__rurDrDrDrE�Trivial@sryrz	a=trivial)r+r,r2�setr@r.)r=rBryrDrDrE�test_urlencode_sequences9s
z)UrlParseTestCase.test_urlencode_sequencescCsjtj�ddi�}|�|d�tjjdditjjd�}|�|d�tjjddidtjjd�}|�|d	�dS)
Nrz
some valueza=some+valuezsome value/another)�	quote_viaza=some%20value%2Fanotherr�)�safer|za=some%20value/another)r+r,r2r.�quoter_rDrDrE�test_urlencode_quote_viaGs��z)UrlParseTestCase.test_urlencode_quote_viacCsF|�ttjjd�tj�d�}|�|d�tj�d�}|�|d�dS)Nr�sarchaeological arcanazarchaeological%20arcanarr)r�r1r+r,�quote_from_bytesr.r_rDrDrE�test_quote_from_bytesQs
z&UrlParseTestCase.test_quote_from_bytescCs4tj�d�}|�|d�tj�d�}|�|d�dS)Nz	abc%20defsabc defrr)r+r,�unquote_to_bytesr.r_rDrDrE�test_unquote_to_bytesXsz&UrlParseTestCase.test_unquote_to_bytescCs0|jttjjddd�|jttjjddd�dS)NsfoorrUrH)rM)r�r1r+r,r~r�rDrDrE�test_quote_errors^s�z"UrlParseTestCase.test_quote_errorscCs�tj�d�}|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�dS)Nztel:+31-641044153�telz
+31-641044153ztel:+31641044153z+31641044153)r+r,r;r.r/r1r-)r=�p1�p2rDrDrE�test_issue14072csz UrlParseTestCase.test_issue14072cCs�|�ttjjd�|�ttjjd�|�ttjjd�|�ttjjd�|�ttjjd�|�ttjjd�|�ttjjd�|�ttjjd�|�ttjjd	�|�ttjjd
�dS)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)r�r�r+r,r;r�rDrDrE�test_invalid_bracketed_hostsrsz-UrlParseTestCase.test_invalid_bracketed_hostscCs�tj�d�}|�|jd�|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�|�|jd�dS)	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,r;r.r9r7r1)r=r�r�Zp3rDrDrE�test_splitting_bracketed_hosts~sz/UrlParseTestCase.test_splitting_bracketed_hostscCs�d}tj�d�}|�t|��|jWd�n1s80Ytj�d�}|�t|��|jWd�n1sv0YdS)Nz3Port could not be cast to integer value as 'oracle'z%http://Server=sde; Service=sde:oracle)r+r,r-rr�r:r;)r=�messager�r�rDrDrE�!test_port_casting_failure_message�s$z2UrlParseTestCase.test_port_casting_failure_messagecCs�tj�d�}|�|jd�|�|jd�|�|jd�tj�d�}|�|jd�|�|jd�|�|jd�tj�d�}|�|jd�|�|jd	�|�|jd
�tj�d�}|�|jd�|�|jd�|�|jd
�dS)Nz"tel:123-4;phone-context=+1-650-516r�z123-4zphone-context=+1-650-516ztel:+1-201-555-0123z+1-201-555-0123rz"tel:7042;phone-context=example.comZ7042zphone-context=example.comz%tel:863-1234;phone-context=+1-914-555z863-1234zphone-context=+1-914-555)r+r,r-r.r/r1r2)r=r�rDrDrE�test_telurl_params�s z#UrlParseTestCase.test_telurl_paramscCs$tj�tjj�}|�dt|��dS)N�Quoter)r+r,r��_ALWAYS_SAFE�assertIn�repr)r=�quoterrDrDrE�test_Quoter_repr�sz!UrlParseTestCase.test_Quoter_reprcCsjg}hd�}ttj�D]>}|�d�s||vr.qttj|�}t|dd�dkr|�|�q|�tjj|�dS)N>�splittag�	splithost�splitpasswd�unwrap�
splitvalue�	splitattr�	splituser�
ResultBase�
splitnport�
splitquery�clear_cache�to_bytes�	splittype�	splitportr�rrwzurllib.parse)�dirr+r,�
startswithrC�appendZassertCountEqual�__all__)r=r�Zundocumented�name�objectrDrDrE�test_all�szUrlParseTestCase.test_allcs2d�dd��D����fdd�tttdtj��D�}|�d|�|�d|�tj�d	�|�	t
��tj�d
�Wd�n1s�0YdD]�}dD]�}|D]�}d
�||�|��}|j|d�t
|��d��F|�	t
��tj�|�Wd�n1s�0YWd�q�1�s0Yq�q�q�dS)Nz/:#?@cSsh|]}d�t|���qS)�{:04X})�format�ord�rN�crDrDrE�	<setcomp>�rz?UrlParseTestCase.test_urlsplit_normalization.<locals>.<setcomp>cs.g|]&}�tt�|����@r|�vr|�qSrD)rz�unicodedata�
decompositionr@r��Z	hex_charsZ
illegal_charsrDrErP�s�z@UrlParseTestCase.test_urlsplit_normalization.<locals>.<listcomp>�u℀u#uhttp://プ:80uhttp://プ︓80)r�r�r=)znetloc{}false.netloczn{}user@netlocz{}://{}/pathr�)r>�char)�map�chrr�sys�
maxunicoder�r+r,r;r�r�r�r"r�)r=Zdenorm_charsr/r0r�r>rDr�rE�test_urlsplit_normalization�s"�*z,UrlParseTestCase.test_urlsplit_normalization)N)4rvrwrxrFrVr[r�r�r�r�r�r�r�r�r�r�r�rrrrr!r#r$r%r-r0r3r;r?rFrGrNrRr`rarfrrrsr{rr�r�r�r�r�r�r�r�r�r�r�rDrDrDrEr)Gsb
5	
A &0-972	]%;)!




r)c@speZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�
Utility_Testsz=Testcase to test the various utility functions in the urllib.cCs\tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�dS)Nztype:opaquestring)r�opaquestringr�)Nr��
:opaquestring)Nr�ztype:)rrztype:opaque:string)rz
opaque:string)r+r,�
_splittyper.)r=r�rDrDrE�test_splittype�szUtility_Tests.test_splittypecCs�tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�|�|d�d�|�|d
�d�|�|d�d�|�|d�d�|�|d�d�dS)Nz%//www.example.org:80/foo/bar/baz.html)�www.example.org:80�/foo/bar/baz.htmlz//www.example.org:80)r�rr�)Nr�z//127.0.0.1#@host.com)�	127.0.0.1�/#@host.comz//127.0.0.1#@host.com:80)r�z/#@host.com:80z//127.0.0.1:80#@host.com)z127.0.0.1:80r�z///file)rz/filez//example.net/file;)�example.netz/file;z//example.net/file?)r�z/file?z//example.net/file#)r�z/file#)r+r,�
_splithostr.)r=r�rDrDrE�test_splithost�s>
�
�
�
�
�
�
�
�
�
�zUtility_Tests.test_splithostcCs\tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�dS)Nr)�	User:Pass�www.python.org:080z@www.python.org:080)rr�r�)Nr�z
User:Pass@)r�rr
)zUser@example.com:Passr�)r+r,�
_splituserr.)r=r�rDrDrE�test_splitusers 
�
�
�
�
�zUtility_Tests.test_splitusercCs�tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�|�|d�d�|�|d
�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�dS)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�rz	user 2:ab)zuser 2r�z
user+1:a+b)zuser+1za+bzuser:)r�rr�)r�Nz:ab)rr�)r+r,�_splitpasswdr.)r=r�rDrDrE�test_splitpasswdszUtility_Tests.test_splitpasswdcCs�tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d	�|�|d
�d�|�|d�d
�|�|d�d�dS)N�	parrot:88)�parrot�88r��r�N�parrot:r�)r�N�
parrot:cheese)r�Nz[::1]:88)�[::1]r�r�)r�Nz:88)rr�)r+r,�
_splitportr.)r=r�rDrDrE�test_splitport$szUtility_Tests.test_splitportcCs�tjj}|�|d�d�|�|d�d�|�|dd�d�|�|d�d�|�|dd�d�|�|d�d	�|�|dd�d
�|�|d�d�|�|dd�d�dS)
Nr�)r�rr�)r�����7)r�r�r�r�)r�r�)r�r�r�r�)r+r,�_splitnportr.)r=r�rDrDrE�test_splitnport/szUtility_Tests.test_splitnportcCsLtjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�dS)	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,�_splitqueryr.)r=r�rDrDrE�test_splitquery;s
�
�
�zUtility_Tests.test_splitquerycCs\tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�dS)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�Zboo)r+r,�	_splittagr.)r=r�rDrDrE�
test_splittagGs
�
�
�
�zUtility_Tests.test_splittagcCsftjj}|�|d�dddgf�|�|d�ddgf�|�|d�dddgf�|�|d�dgf�dS)Nz/path;attr1=value1;attr2=value2r�zattr1=value1zattr2=value2z/path;rz;attr1=value1;attr2=value2)r+r,�
_splitattrr.)r=r�rDrDrE�test_splitattrSs

�

�zUtility_Tests.test_splitattrcCs\tjj}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�dS)Nr�)r��barzfoo=)r�rz=bar)rr��foobar)r�Nzfoo=bar=baz)r�zbar=baz)r+r,�_splitvaluer.)r=r�rDrDrE�test_splitvalue\szUtility_Tests.test_splitvaluecCs.tj�d�}|�|d�|�ttjjd�dS)Nzhttp://www.python.orguhttp://www.python.org/mediæval)r+r,�	_to_bytesr.r��UnicodeErrorr_rDrDrE�
test_to_bytesfs
�zUtility_Tests.test_to_bytescCs&dD]}tj�|�}|�|d�qdS)N)z<URL:scheme://host/path>z<scheme://host/path>zURL:scheme://host/path�scheme://host/pathr�)r+r,r�r.)r=Zwrapped_urlr>rDrDrE�test_unwraplszUtility_Tests.test_unwrapN)rvrwrx�__doc__r�r�r�r�r�r�r�r�r�r�r�r�rDrDrDrEr��s
	
r�c@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�DeprecationTestcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() instead)�assertWarns�DeprecationWarningr+r,r�r.�str�warning�r=�cmrDrDrE�test_splittype_deprecationus
*�z*DeprecationTest.test_splittype_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splithost_deprecation|s
*�z*DeprecationTest.test_splithost_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splituser_deprecation�s
*�z*DeprecationTest.test_splituser_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splitpasswd_deprecation�s
*�z,DeprecationTest.test_splitpasswd_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splitport_deprecation�s
*�z*DeprecationTest.test_splitport_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splitnport_deprecation�s
*�z+DeprecationTest.test_splitnport_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splitquery_deprecation�s
*�z+DeprecationTest.test_splitquery_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splittag_deprecation�s
*�z)DeprecationTest.test_splittag_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splitattr_deprecation�s
*�z*DeprecationTest.test_splitattr_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)NrzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() instead)r�r�r+r,r�r.r�r�r�rDrDrE�test_splitvalue_deprecation�s
*�z+DeprecationTest.test_splitvalue_deprecationcCsL|�t��}tj�d�Wd�n1s,0Y|�t|j�d�dS)Nrz/urllib.parse.to_bytes() is deprecated as of 3.8)r�r�r+r,r�r.r�r�r�rDrDrE�test_to_bytes_deprecation�s
*�z)DeprecationTest.test_to_bytes_deprecationN)rvrwrxr�r�r�r�r�r�r�r�rrrrDrDrDrEr�ssr��__main__)r�r�Zunittest�urllib.parser+r�r�r�r�rQrYZTestCaser)r�r�rv�mainrDrDrDrE�<module>s�



��O


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