
#þîh  ã               @   sð   d  d l  m Z d  d l Z d  d l m Z m Z d e d d% d d	 d
 d d d d i d d ƒ d e d d& d d d' i d d ƒ d e d d( d d d) d d i d d ƒ i Z e j j	 d e j
 ƒ  ƒ d d  „  ƒ Z d! d" „  Z d# d$ „  Z d S)*é    )ÚcleandocN)ÚSetuptoolsDeprecationWarningÚSetuptoolsWarningÚdefaultÚargsú	Hello {x}ú
	{target} {v:.1f}ÚkwargsÚxé   Úvé   ÚtargetZWorldÚexpectedzñ
    Hello 5
    !!

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

    !!
    Zfutue_due_dateÚSummaryúLorem ipsumZdue_dateé'  é   é   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.
            ********************************************************************************

    !!
    Zpast_due_date_with_docséÐ  Zsee_docszsome_page.htmla×  
    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.
            ********************************************************************************

    !!
    Úexample_namec          
   C   s…   t  | d } t  | d } t  | d } |  j d d ƒ t j t ƒ � } t j | | Ž  Wd QRXt | ƒ t | ƒ k s� t ‚ 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!   úD/tmp/pip-build-zijwfla7/setuptools/setuptools/tests/test_warnings.pyÚtest_formatting=   s    r#   c          
   C   st   Gd d „  d t  ƒ } |  j d d ƒ t j t  ƒ � } | j ƒ  Wd  QRXd } t | j ƒ t | ƒ k sp t ‚ d  S)Nc               @   s(   e  Z d  Z d Z d Z d Z d Z d S)	z1test_due_date_enforcement.<locals>._MyDeprecationr   zLorem ipsuméÐ  r   r   zsome_page.htmlN)r$   r   r   )Ú__name__Ú
__module__Ú__qualname__Z_SUMMARYZ_DETAILSZ	_DUE_DATEZ	_SEE_DOCSr!   r!   r!   r"   Ú_MyDeprecationM   s   r(   r   Útruea×  
    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.
            ********************************************************************************

    !!
    )	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   )r   r   )úSummaryr   )r   r   r   )r3   r   )r   r   r   )Úinspectr   r   Zsetuptools.warningsr   r   Údictr   ÚmarkZparametrizeÚkeysr#   r-   r   r!   r!   r!   r"   Ú<module>   s"   	
		'