a
    s=ic                     @   sr   d dl Z d dlZd dlZd dlmZ ejdg ddd Zdd Z	d	d
 Z
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   sj   dt |  dtd|  }t|}tjt|d tj	| |d W d    n1 s\0    Y  d S )Nz^'aardvark' must be zD.*z
has shape match)Zaardvark)
lenreescapenpZzerospytestraises
ValueErrorr   Zcheck_shape)targetZ
test_shapeZerror_patterndata r   j/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/matplotlib/tests/test_api.pytest_check_shape	   s    
r   c                  C   s|   G dd d} t tj | j W d    n1 s60    Y  t tj |  }|j W d    n1 sn0    Y  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                  C   s   G dd d} |  }t tj |jdks0J W d    n1 sD0    Y  t tj d|_W d    n1 sv0    Y  t tj |jdksJ W d    n1 s0    Y  t tj" |ddksJ W d    n1 s0    Y  d S )Nc                   @   s0   e Zd Zdd Zdd ZedZedZdS )z-test_deprecate_privatize_attribute.<locals>.Cc                 S   s
   d| _ d S )Nr   )Z_attr)selfr   r   r   __init__'       z6test_deprecate_privatize_attribute.<locals>.C.__init__c                 S   s   |S r   r   )r#   argr   r   r   _meth(   r%   z3test_deprecate_privatize_attribute.<locals>.C._methz0.0N)	r   r   r   r$   r'   r   Zdeprecate_privatize_attributeattrmethr   r   r   r   C&   s   
r*   r   r   *   )r   r   r   r    r(   r)   )r*   cr   r   r   "test_deprecate_privatize_attribute%   s    ,$,r-   c               	      s   t ddddd t dddd }  | fD ]@}|  tt j |dd W d    q21 sh0    Y  q2t jjf fd	d
	}|  tt j |dd W d    n1 s0    Y  d S )N3.0fooc                 S   s   d S r   r   r/   r   r   r   func18   s    z$test_delete_parameter.<locals>.func1c                  [   s   d S r   r   )kwargsr   r   r   func2<   s    z$test_delete_parameter.<locals>.func2barr0   c                    s    |  d S r   r   r0   r1   r   r   pyplot_wrapperE   s    z-test_delete_parameter.<locals>.pyplot_wrapper)N)r   Zdelete_parameterr   r   r    deprecationZ_deprecated_parameter)r3   funcr6   r   r5   r   test_delete_parameter7   s    


*r9   c                  C   s   t ddd	dd} | ddd tt j | dd W d    n1 sN0    Y  tt j | ddd W d    n1 s0    Y  d S )
Nr.   r&   c                 S   s   d S r   r   )prer&   postr   r   r   r8   N   s    z$test_make_keyword_only.<locals>.funcr   r   )r&   r   )N)r   Zmake_keyword_onlyr   r   r    )r8   r   r   r   test_make_keyword_onlyM   s    
(r<   c                  C   s,   d} t jd| ddd }| |jv s(J d S )Nz)`.f1`, `f2`, `f3(x) <.f3>` or `f4(x)<f4>`1)alternativec                   S   s   d S r   r   r   r   r   r   r   \   s    z'test_deprecation_alternative.<locals>.f)r   r   __doc__)r>   r   r   r   r   test_deprecation_alternativeZ   s    
r@   c                   C   s>   t jtdd tdg W d    n1 s00    Y  d S )NzNo argument to check!r
   r!   )r   r   	TypeErrorr   Zcheck_in_listr   r   r   r   test_empty_check_in_listb   s    rB   )r   numpyr   r   Z
matplotlibr   markZparametrizer   r"   r-   r9   r<   r@   rB   r   r   r   r   <module>   s   
