U
    \	a[                     @   s`   d dl Z d dlZd dlZd dlmZ ejddddddgd	d
 Zdd Z	dd Z
dd ZdS )    N)_apiztarget,test_shape)N)      )Nr   )r   )r   )r      ))r      )r   	   ))Nr   N)r   r   r   c              	   C   sV   dt |  dtd|  }t|}tjt|d tj	| |d W 5 Q R X d S )Nz^'aardvark' must be zD.*z
has shape )match)Zaardvark)
lenreescapenpzerospytestZraises
ValueErrorr   Zcheck_shape)targetZ
test_shapeZerror_patterndata r   =/tmp/pip-unpacked-wheel-wjyw_3jo/matplotlib/tests/test_api.pytest_check_shape	   s    
r   c               	   C   sT   G dd d} t tj | j W 5 Q R X t tj |  }|j W 5 Q R X d S )Nc                   @   s$   e Zd Zedejdd ZdS )z)test_classproperty_deprecation.<locals>.Az0.0.0c                 S   s   d S r   r   )clsr   r   r   f   s    z+test_classproperty_deprecation.<locals>.A.fN)__name__
__module____qualname__r   
deprecatedZclasspropertyr   r   r   r   r   A   s   r   )r   warnsr   MatplotlibDeprecationWarningr   )r   ar   r   r   test_classproperty_deprecation   s    r!   c               
      s   t ddddd t dddd }  | fD ],}|  tt j |dd W 5 Q R X q2t jjf fd	d
	}|  tt j |dd W 5 Q R X d S )N3.0fooc                 S   s   d S r   r   r#   r   r   r   func1&   s    z$test_delete_parameter.<locals>.func1c                  [   s   d S r   r   )kwargsr   r   r   func2*   s    z$test_delete_parameter.<locals>.func2barr$   c                    s    |  d S r   r   r$   r%   r   r   pyplot_wrapper3   s    z-test_delete_parameter.<locals>.pyplot_wrapper)N)r   Zdelete_parameterr   r   r   deprecationZ_deprecated_parameter)r'   funcr*   r   r)   r   test_delete_parameter%   s    


r-   c               	   C   sl   t ddd	dd} | ddd tt j | dd W 5 Q R X tt j | ddd W 5 Q R X d S )
Nr"   argc                 S   s   d S r   r   )prer.   postr   r   r   r,   <   s    z$test_make_keyword_only.<locals>.funcr   r   )r.   r   )N)r   Zmake_keyword_onlyr   r   r   )r,   r   r   r   test_make_keyword_only;   s    
r1   )r   Znumpyr   r   Z
matplotlibr   markZparametrizer   r!   r-   r1   r   r   r   r   <module>   s   
