+
    m4i                     h    ^ RI Ht ^ RIHtHt ^RIHtHt ^RIH	t	 ^RI
Ht RtRt ! R R	]4      tR
# )    )unicode_literals)DictUnion)
DecodedURLURL)_percent_decode)HyperlinkTestCasezhttp://example.com/#ua   https://%75%73%65%72:%00%00%00%00@xn--bcher-kva.ch:8080/a/nice%20nice/./path/?zot=23%25&zut#frégc                   h   a  ] tR t^t o 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V tR# )TestURLc                h   \         P                  ! \        4      pVP                  R 8X  g   Q hVP                  R8X  g   Q hVP
                  ^P8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q h\         P                  ! \        4      pVP                  R8X  g   Q hVP                  R8X  g   Q hVP
                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R4      R.8X  g   Q hVP                  R	8X  g   Q hVP                  R8X  g   Q hR
# )httpzexample.com httpsu
   bücher.chi  u   frégzot23%userN)r   )az	nice nice.pathr   )r   z    )r   	from_text	BASIC_URLschemehostportr   fragment	TOTAL_URLgetr   userinfo)selfbdurldurls   &  A/usr/lib/python3/dist-packages/hyperlink/test/test_decoded_url.pytest_durl_basicTestURL.test_durl_basic   s   $$Y/||v%%%zz]***zzRzzU"""~~#####I.{{g%%%yyL(((yyD   yy????}}'''xx5')))yyF"""}} 4444    c                   \         P                  ! \        4      pVP                  R 4      P                  R,          R 8X  g   Q hVP                  R4      P                  R,          R8X  g   Q hVP                  4       V8X  g   Q hVP                  4       VJ g   Q hVP                  R4      P                  R,          R8X  g   Q hVP                  R8X  g   Q hRVP                  9   g   Q hRVP                  4       P                  9  g   Q hVP                  4       P                  R8X  g   Q hRVP                  4       P                  ^,          9   g   Q hVP                  RR	7      \        8X  g   Q hVP                  '       g   Q hVP                  '       g   Q hWP                  P!                  4       8X  g   Q h\         P                  ! \        RR
7      pW"P                  P!                  RR
7      8X  g   Q h\#        \         P                  ! \$        4      P                  R4      4      R8X  g   Q hV^8X  d   Q hV^8w  g   Q hR# )zte%tz	../test2%/r   r   r   z	fr%C3%A9g T)with_password)lazyzhttp://example.com/%20N)r   r   r   siblingr   childclickr   	normalizeto_urir   to_irito_textabsoluterootedencoded_urlget_decoded_urlstrr   r   r!   durl2s   &  r"   test_passthroughsTestURL.test_passthroughs'   s    ##I.||F#((,666zz+&++B/;>>>zz|t###zz|t###zz###B'2---yyF"""dii$..*/////{{}%%444dkkm((++++||$|/9<<<}}}}{{{{''779999$$YT:))99t9DDDD 
$$Y/55c:;'(	
( AIqyyr%   c                    \         P                  ! \        4      p\        V4      R \        VP                  4      ,           R,           8X  g   Q hR# )zDecodedURL(url=)N)r   r   r   repr_urlr   r!   s   & r"   	test_reprTestURL.test_reprM   s7    ##I.Dz.dii@3FFFFr%   c                   \         P                  ! \        4      pVP                  R 4      R.8X  g   Q hVP	                  RR4      pVP                  R4      R.8X  g   Q hVP                  RR4      pVP                  R4      R.8X  g   Q h\        VP                  4       R7      pVP                  R4      R.8X  g   Q hVP                  R4      pVP                  R4      . 8X  g   Q h\         P                  ! R4      pVP                  R4      RR	.8X  g   Q hVP                  RR
4      P                  R4      R
.8X  g   Q h\         P                  ! R4      pVP                  R4      \         P                  ! R4      8X  g   Q hVP                  RRR7      \         P                  ! R4      8X  g   Q hVP                  R^R7      \         P                  ! R4      8X  g   Q hVP                  RR^ R7      \         P                  ! R4      8X  g   Q hR# )r   r   r(   spacezspa%ed)urlz/?%61rg=b&arg=cargbcdu.   https://example.com/a/b/?fóó=1&bar=2&fóó=3u   fóózhttps://example.com/a/b/?bar=21)valueu&   https://example.com/a/b/?bar=2&fóó=3)limit)rK   rL   N)r   r   r   r   addsetr0   remover@   s   & r"   test_query_manipulationTestURL.test_query_manipulationR   s   ##I.xx5')))xxW%xx}	)))xxX&xx}
***dkkm,xx}
***{{3xx}"""##$56xx3*,,,xxs#''.3%777##<
 {{7#z';';,(
 
 	
 
 {{7#{.*2F2F43
 
 	
 
 {{7!{,
0D0D41
 
 	
 
 {{7#Q{7:;O;O<<
 
 	
 
r%   c                   \         P                  ! \        4      p\         P                  ! \        4      p\         P                  ! \        4      pVP	                  4       pW8X  g   Q hW8X  g   Q hW8w  g   Q hVf   Q hWP
                  8w  g   Q h\        \        \         3,          p/ pWV&   W&V&   \        V4      ^8X  g   Q hW6V&   \        V4      ^8X  g   Q hWFV&   \        V4      ^8X  g   Q hR # )N)	r   r   r   r   r0   r?   r   r   len)r   r!   r9   burldurl_uriAnyURLdurl_maps   &      r"   test_equality_and_hashability%TestURL.test_equality_and_hashabilityv   s    ##I.$$Y/##I.;;=||}}||yy   sJ'8}!!!8}!!!%8}!!!r%   c                2   \         P                  ! \        4      pVP                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  R 7	      pW8X  g   Q hR# ))	r   r   r   queryr   r   r4   r   uses_netlocN)r   r   r   replacer   r   r   r[   r   r   r4   r   r\   r8   s   &  r"   test_replace_roundtripTestURL.test_replace_roundtrip   sr    ##I.;;**]];;]]((  

 }}r%   c                    \         P                  ! \        4      pV P                  \        4      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     R# ; i)r   )r   N)r   pwthiswillcauseafailure)r   r   r   assertRaises
ValueErrorr]   r@   s   & r"   test_replace_userinfoTestURL.test_replace_userinfo   sQ    ##I.z**LL   + 	 +* 	s   AA&	c                   \         P                  ! \        4      pV\         P                  ! \        4      8X  g   Q hR \	        V4      9   g   Q hR\	        V4      9  g   Q hVP                  4       VP                  4       8X  g   Q hR# )r2   asTextN)r   r   r   fromTextdirr2   rh   r@   s   & r"   test_twisted_compatTestURL.test_twisted_compat   si    ##I.z**95555CI%%%s4y(((||~...r%   c                   \        R 4      R8X  g   Q h\        R4      R8X  g   Q hV P                  \        4      ;_uu_ 4        \        RRR7       RRR4       \        RRR7      R8X  g   Q hR#   + '       g   i     L&; i)	u   abcdé%C3%A9éfgu   abcdéééfgu   abcdé%C3éfgT)raise_subencoding_excNu   é%25éascii)subencoding)r   rc   UnicodeDecodeError)r   s   &r"   test_percent_decode_mixed!TestURL.test_percent_decode_mixed   sp    
 12nDDD /?BBB 122O4H 3 yg>)KKK	 32s   A..A>	c                "   \         P                  ! \        4      p\         P                  ! R 4      pVP                  V4      pVP                  VP                  8X  g   Q hVP
                  VP
                  8X  g   Q hVP
                  R8X  g   Q hR# )u   /tëstN)u   tëst)r   r   r   r.   r   r   )r   r!   	durl_destclickeds   &   r"   test_click_decoded_urlTestURL.test_click_decoded_url   sn    ##I.((2	**Y'||tyy(((||y~~---||z)))r%   c                    \         P                  ! R 4      pVP                  R8X  g   Q hVP                  R4      R.8X  g   Q hVP                  R8X  g   Q hR# )/x+y%2B?a=b+c%2Br   b c+Nzx+y+))r   r{   r   r   r   r   r[   r@   s   & r"   test_decode_plusTestURL.test_decode_plus   sP    ##$67yyI%%%xx}(((zz----r%   c                    \         P                  ! R RR7      pVP                  R8X  g   Q hVP                  R4      R.8X  g   Q hVP                  R8X  g   Q hR# )rz   F)query_plus_is_spacer   b+c+Nr|   ))r   r   r}   r@   s   & r"   test_decode_nonplussedTestURL.test_decode_nonplussed   sV    ##E
 yyI%%%xx}(((zz----r%    N)__name__
__module____qualname____firstlineno__r#   r:   rA   rP   rX   r^   re   rk   rr   rw   r~   r   __static_attributes____classdictcell__)__classdict__s   @r"   r   r      sJ     5*$LG
"
H":$/L"*.. .r%   r   N)
__future__r   typingr   r   r   r   r   r?   r   commonr	   r   r   r   r   r%   r"   <module>r      s4    (   " %"	0 
S. S.r%   