U
    aÊ¹j  ã                   @   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}é   é   Z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   Z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.
            ********************************************************************************

    !!
    )ÚdefaultZfutue_due_dateZpast_due_date_with_docsÚexample_namec              	   C   sj   t | d }t | d }t | d }|  dd¡ t t¡�}tj||Ž W 5 Q R X t|ƒt|ƒksft‚dS )z]
    It should automatically handle indentation, interpolation and things like due date.
    r
   r   r   ÚSETUPTOOLS_ENFORCE_DEPRECATIONÚfalseN)	Ú	_EXAMPLESÚsetenvÚpytestZwarnsr   ÚemitÚ_get_messager   ÚAssertionError)Úmonkeypatchr   r
   r   r   Ú	warn_info© r!   ú]/var/www/html/bwave/python/venv/lib/python3.8/site-packages/setuptools/tests/test_warnings.pyÚtest_formatting=   s    r#   c              	   C   sX   G dd„ dt ƒ}|  dd¡ t t ¡�}| ¡  W 5 Q R X d}t|jƒt|ƒksTt‚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__Z_SUMMARYZ_DETAILSZ	_DUE_DATEZ	_SEE_DOCSr!   r!   r!   r"   Ú_MyDeprecationM   s   r'   r   Útruer   )	r   r   r   Zraisesr   ÚstrÚvaluer   r   )r   r'   Úexc_infor   r!   r!   r"   Útest_due_date_enforcementL   s    r,   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   Zsetuptools.warningsr   r   Údictr   ÚmarkZparametrizeÚkeysr#   r,   r   r!   r!   r!   r"   Ú<module>   s,   
ýýýà6
