| Server IP : 159.223.102.202 / Your IP : 216.73.217.92 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/hyperlink/test/__pycache__/ |
Upload File : |
�
�(_� � � � d Z ddlZ[ddlmZ ddlmZmZ ddlmZ ddlmZmZ ddl
mZmZ ddlmZmZmZ d d
lmZ ddlmZmZ dd
lmZmZmZmZmZmZm Z m!Z!m"Z" G d� de� Z#y# e $ r ddl
mZ Y �Ww xY w# e $ r Y yw xY w)z!
Tests for hyperlink.hypothesis.
� N)�digits)�Sequence�Text)�patch)�given�settings)�SearchStrategy�data)� IDNAError�check_label�encode� )�HyperlinkTestCase� )�
DecodedURL�
EncodedURL) �DrawCallable� composite�decoded_urls�encoded_urls�hostname_labels� hostnames� idna_text�paths�port_numbersc �R � e Zd ZdZ e e� � d� � Z e e� � d� � Z e e � � d� � Z
e e d�� � d� � Z e e� � d� � Z
e e� � ed �
� d� � � Z e ed�
� � d� � Z e e� � d� � Z e ed�� � d� � Z e ed�
� � d� � Z e edd�� � d� � Z e e� � d� � Z e e� � d� � Z e e� � d� � Zy)�TestHypothesisStrategiesz1
Tests for hyperlink.hypothesis.
c �j � t |� y# t $ r t dj |� � �w xY w)zD
idna_text() generates IDNA-encodable text.
zInvalid IDNA text: {!r}N)�idna_encoder �AssertionError�format)�self�texts �@/usr/lib/python3/dist-packages/hyperlink/test/test_hypothesis.py�test_idna_text_validz-TestHypothesisStrategies.test_idna_text_valid- s8 � �
M��D�!���
M�$�%>�%E�%E�d�%K�L�L�
M�s � �$2c � � | j t |j t d�� � | j t |j t d�� � y)zO
idna_text() raises AssertionError if min_size is < 1.
r )�min_size)�max_sizeN)�assertRaisesr �drawr )r"