o
    i                     @   st   d dl Z d dlZd dlZd dlZd dlZejje jdkddejje jdko+e  d kdddd Z	dd	 Z
dS )
    Nntz%chmod() doesn't work as is on Windows)reasonzchmod() doesn't work as rootc              
   C   sx   t | j}z.t | d tjtjddgi t jdt	| itj
ddd}d|jv s,J W t | | dS t | | w )	zETest that a warning is emitted if a temporary configdir must be used.r   z-czimport matplotlibMPLCONFIGDIRT)envstderruniversal_newlinescheckzset the MPLCONFIGDIRN)osstatst_modechmod
subprocessrunsys
executableenvironstrPIPEr   )tmpdirmodeproc r   [/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/matplotlib/tests/test_matplotlib.pytest_tmpconfigdir_warning
   s   
r   c                  C   sD   dd } t | dt tjjksJ t | dt tjjks J dS )z
    Test that the standard backends mentioned in the docstring of
    matplotlib.use() are the same as in matplotlib.rcsetup.
    c                 S   sL   g }t jj| d dD ]}| s |S |dd |dD 7 }q|S )N   
c                 S   s   g | ]}|r|  qS r   )strip).0er   r   r   
<listcomp>&   s    zAtest_use_doc_standard_backends.<locals>.parse.<locals>.<listcomp>,)
matplotlibuse__doc__splitr   )keybackendsliner   r   r   parse!   s   z-test_use_doc_standard_backends.<locals>.parsez- interactive backends:
z- non-interactive backends:
N)setr!   rcsetupinteractive_bknon_interactive_bk)r(   r   r   r   test_use_doc_standard_backends   s   



r-   )r	   r   r   pytestr!   markskipifnamegeteuidr   r-   r   r   r   r   <module>   s    
