o
    Åü(_S  ã                   @   sP   d dl mZ ddlmZ d dlmZmZmZ dZdZ	e	d Z
G dd	„ d	eƒZd
S )é    )Úunicode_literalsé   )ÚHyperlinkTestCase)ÚparseÚ
EncodedURLÚ
DecodedURLz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Ã©gz%C3c                   @   s   e Zd Zdd„ ZdS )ÚTestURLc                 C   sè   t tƒ}t|tƒsJ ‚|jdksJ ‚| d¡dgksJ ‚|jdks#J ‚t tdd�}t|tƒs0J ‚| d¡dgks:J ‚|  t	¡� t t
ƒ}W d   ƒ n1 sNw   Y  t t
dd	�}|  t	¡� |j W d   ƒ d S 1 smw   Y  d S )
NÚuserÚzotz23%u   frÃ©gF)Údecodedz23%25T)Úlazy)r   Ú	TOTAL_URLÚ
isinstancer   r	   ÚgetÚfragmentr   ÚassertRaisesÚUnicodeDecodeErrorÚUNDECODABLE_FRAG_URL)ÚselfÚpurlÚpurl2Úpurl3© r   ú;/usr/lib/python3/dist-packages/hyperlink/test/test_parse.pyÚ
test_parse   s   
ÿ"ÿzTestURL.test_parseN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s    r   N)Ú
__future__r   Úcommonr   Ú	hyperlinkr   r   r   Ú	BASIC_URLr   r   r   r   r   r   r   Ú<module>   s   ÿ