a
    feza                     @   sl   d Z ddlZddlZddlmZ ddlmZ ejj	ej
dk dddd Zejj	ej
dk ddd	d
 ZdS )zg
Tests making sure that deprecated objects properly raise a deprecation warning
when imported/created.
    N)_deprecated_names)      zno module-level getattr)reasonc               	   C   s`   dt v sJ t D ]J} d| }tjt|d td|  W d    q1 sP0    Y  qd S )NZJoblibException8{} is deprecated and will be removed from joblib in 0.16matchz#from joblib.my_exceptions import {})_deprecated_exceptionsformatpytestwarnsDeprecationWarningexec)namemsg r   Blib/python3.9/site-packages/joblib/test/test_deprecated_objects.py!test_deprecated_joblib_exceptions   s    r   c              	   C   sl   dt v sJ dt v sJ t D ]J}d|}tjt|d td| W d    q1 s\0    Y  qd S )NZ	safe_reprZeq_reprr   r   z"from joblib.format_stack import {})_deprecated_format_utilsr
   r   r   r   r   )Zcapsysr   r   r   r   r   $test_deprecated_formatting_utilities   s    r   )__doc__sysr   Zjoblib.my_exceptionsr   r	   Zjoblib.format_stackr   ZmarkZxfailversion_infor   r   r   r   r   r   <module>   s   
	