
    EVfU
                     l   d dl Z d dlZd dlZd dlZd dlZej
                  j                  dg d      d        Zej
                  j                  ej                  dk(  d      ej
                  j                  ej                  dk7  xr  e j                         d k(  d      d	               Zd
 Zd Zd Zy)    Nzversion_str, version_tuple))z3.5.0)      r   finalr   )z3.5.0rc2)r   r   r   	candidate   )z3.5.0.dev820+g6768ef8c4c)r   r   r   alpha4  )z3.5.0.post820+g6768ef8c4c)r   r      r   r	   c                 8    t        j                  |       |k(  sJ y )N)
matplotlib_parse_to_version_info)version_strversion_tuples     i/var/www/html/software/conda/envs/catlas/lib/python3.12/site-packages/matplotlib/tests/test_matplotlib.pytest_parse_to_version_infor   
   s     ,,[9]JJJ    win32z%chmod() doesn't work as is on Windows)reasonzchmod() doesn't work as rootc                    t        j                  |       j                  }	 t        j                  | d       t	        j
                  t        j                  ddgi t         j                  dt        |       it        j                  dd      }d|j                  v sJ 	 t        j                  | |       y# t        j                  | |       w xY w)	zETest that a warning is emitted if a temporary configdir must be used.r   -czimport matplotlibMPLCONFIGDIRT)envstderrtextcheckzset the MPLCONFIGDIRN)osstatst_modechmod
subprocessrunsys
executableenvironstrPIPEr   )tmpdirmodeprocs      r   test_tmpconfigdir_warningr*      s     776?""D
~~^^T#67;2::;~s6{;??T; &444
s   A<B5 5Cc                     t        j                  t        j                  ddgi t        j
                  dt        |       id       y )Nr   zOimport pathlib; pathlib.Path.home = lambda *args: 1/0; import matplotlib.pyplotr   T)r   r   )r    r!   r"   r#   r   r$   r%   )r'   s    r   test_importable_with_no_homer,   &   s=    NN	
$	% 8rzz7>3v;7t	Er   c                      d } t         | d            t        t        j                  j                        k(  sJ t         | d            t        t        j                  j                        k(  sJ y)z
    Test that the standard backends mentioned in the docstring of
    matplotlib.use() are the same as in matplotlib.rcsetup.
    c                     g }t         j                  j                  j                  |       d   j                  d      D ]H  }|j	                         s |S ||j                  d      D cg c]  }|s|j	                          c}z  }J |S c c}w )Nr
   
,)r   use__doc__splitstrip)keybackendslinees       r   parsez-test_use_doc_standard_backends.<locals>.parse3   s    NN**005a8>>tD 	BD::< DJJsOAqqAAH	B  Bs   (B0Bz- interactive backends:
z- non-interactive backends:
N)setr   rcsetupinteractive_bknon_interactive_bk)r9   s    r   test_use_doc_standard_backendsr>   .   sk    
 123
""1123 4 3567
""5567 8 7r   c                      d} t         j                  dd| g}t        j                  |i t        j
                  ddi      dk(  sJ y)	z
    When using -OO or export PYTHONOPTIMIZE=2, docstrings are discarded,
    this simple test may prevent something like issue #17970.
    zimport matplotlib as mpl; import matplotlib.pyplot as plt; import matplotlib.cbook as cbook; import matplotlib.patches as mpatchesz-OOr   
MPLBACKEND )r   r   N)r"   r#   r    callr   r$   )programcmds     r   test_importable_with__OOrE   A   sJ    	0  >>5$
0C??3$Drzz$D<$DEJJJr   )r   r    r"   pytestr   markparametrizer   skipifplatformgeteuidr*   r,   r>   rE    r   r   <module>rM      s    	  
   5 8 KK CLLG+B  DCLLG+A


0A9  ;;DE8&Kr   