o
    5‘ði  ã                   @   sŽ   d dl mZ d dlZd dlmZmZ edddddœd	d
�edddidd
�eddddœdd
�dœZej 	de 
¡ ¡dd„ ƒZdd„ Zdd„ ZdS )é    )ÚcleandocN)ÚSetuptoolsDeprecationWarningÚSetuptoolsWarning)z	Hello {x}z
	{target} {v:.1f}é   é   ÚWorld)ÚxÚvÚtargetzñ
    Hello 5
    !!

            ********************************************************************************
            World 3.0
            ********************************************************************************

    !!
    )ÚargsÚkwargsÚexpected)ÚSummaryúLorem ipsumÚdue_date)i'  é   é   a„  
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            By 9999-Nov-22, you need to update your project and remove deprecated calls
            or your builds will no longer be supported.
            ********************************************************************************

    !!
    ©iÐ  r   r   úsome_page.html)r   Úsee_docsá×  
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            This deprecation is overdue, please update your project and remove deprecated
            calls to avoid build errors in the future.

            See https://setuptools.pypa.io/en/latest/some_page.html for details.
            ********************************************************************************

    !!
    )ÚdefaultÚfutue_due_dateÚpast_due_date_with_docsÚexample_namec                 C   s‚   t | d }t | d }t | d }|  dd¡ t t¡�}tj|i |¤Ž W d  ƒ n1 s0w   Y  t|ƒt|ƒks?J ‚dS )z]
    It should automatically handle indentation, interpolation and things like due date.
    r   r   r   ÚSETUPTOOLS_ENFORCE_DEPRECATIONÚfalseN)Ú	_EXAMPLESÚsetenvÚpytestÚwarnsr   ÚemitÚ_get_messager   )Úmonkeypatchr   r   r   r   Ú	warn_info© r%   ú]/root/parts/websockify/install/lib/python3.10/site-packages/setuptools/tests/test_warnings.pyÚtest_formatting=   s   ÿr'   c                 C   sl   G dd„ dt ƒ}|  dd¡ t t ¡�}| ¡  W d   ƒ n1 s"w   Y  d}t|jƒt|ƒks4J ‚d S )Nc                   @   s   e Zd ZdZdZdZdZdS )z1test_due_date_enforcement.<locals>._MyDeprecationr   r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú_SUMMARYÚ_DETAILSÚ	_DUE_DATEÚ	_SEE_DOCSr%   r%   r%   r&   Ú_MyDeprecationM   s
    r/   r   Útruer   )r   r   r   Úraisesr!   ÚstrÚvaluer   )r#   r/   Úexc_infor   r%   r%   r&   Útest_due_date_enforcementL   s   
ÿr5   c                 C   s   t dd„ | D ƒƒS )Nc                 s   s   � | ]	}|j jd  V  qdS )r   N)Úmessager   )Ú.0Úwarnr%   r%   r&   Ú	<genexpr>j   s   € z_get_message.<locals>.<genexpr>)Únext)r$   r%   r%   r&   r"   i   s   r"   )Úinspectr   r   Úsetuptools.warningsr   r   Údictr   ÚmarkÚparametrizeÚkeysr'   r5   r"   r%   r%   r%   r&   Ú<module>   s.    
ýýýà6
