o
    i	                     @   sx   d dl Z d dlZd dlZd dlmZ d dlZd dlZd dlmZ	 d dl
mZ dd Zdd Zd	d
 Zdd Zdd ZdS )    N)Path)pyplot)MatplotlibDeprecationWarningc              
   C   s   t tjjd d }| std t tj }| 	d}|
|d tjtjt|t|gdd |d}||krZd	tj|d|dd	d
ddd}td|  d S d S )N   ztools/boilerplate.pyzboilerplate.py not foundz	pyplot.pyzutf-8T)check
zfound pyplot.pyzexpected pyplot.pyr    )fromfiletofilenlinetermzpyplot.py is not up-to-date. Please run 'python tools/boilerplate.py' to update pyplot.py. This needs to be done from an environment where your current working copy is installed (e.g. 'pip install -e'd). Here is a diff of unexpected differences:
%s)r   mpl__file__parentsexistspytestskipplt	read_textjoin
write_text
subprocessrunsys
executablestrdifflibunified_diffsplitfail)tmpdir
gen_scriptorig_contentsplt_filenew_contentsdiff_msg r&   W/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/matplotlib/tests/test_pyplot.pytest_pyplot_up_to_date   s2   


r(   c                 C   s   t jdddt jddddd}t|ddd}|d  |d d	 |d d d
 |d d d | r7J tt |d d W d    n1 sLw   Y  tt |d d  W d    d S 1 sgw   Y  d S )Nz	(version)oldnewkwoc                 S      d S Nr&   r*   r+   r&   r&   r'   func*   s   z1test_copy_docstring_and_deprecators.<locals>.funcc                 S   r,   r-   r&   r.   r&   r&   r'   wrapper_func/   s   z9test_copy_docstring_and_deprecators.<locals>.wrapper_func)r*   )r+   r.   )r)   r-   )	r   cbook_rename_parameter_make_keyword_onlyr   _copy_docstring_and_deprecatorsr   warnsr   )recwarnr/   r0   r&   r&   r'   #test_copy_docstring_and_deprecators)   s    
"r7   c                  C   sd   t  \} }t d | rJ t d | sJ t   | r&J t   | s0J d S )NFT)r   subplotsboxget_frame_on)figaxr&   r&   r'   test_pyplot_box>   s   

r=   c                   C   s   t g dg d d S )N)   r      )r   	stackplotr&   r&   r&   r'   test_stackplot_smokeJ   s   rA   c                   C   sr   t t tjdd W d    n1 sw   Y  t t tjdd W d    d S 1 s2w   Y  d S )Nr>   )nrows)ncols)r   raises	TypeErrorr   subplotr&   r&   r&   r'   test_nrows_errorO   s   "rG   )r   r   r   pathlibr   r   
matplotlibr   r   r   matplotlib.cbookr   r(   r7   r=   rA   rG   r&   r&   r&   r'   <module>   s    