
    hG                     v   S SK r S SKrS SKrS SKrS SKrS SKJr  \R                  R                  S/ SQ5      S 5       r	\R                  R                  \R                  S:H  SS9\R                  R                  \R                  S:g  =(       a    \ R                  " 5       S :H  S	S9S
 5       5       rS rS rS rg)    N)subprocess_run_for_testingz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                 <    [         R                  " U 5      U:X  d   eg )N)
matplotlib_parse_to_version_info)version_strversion_tuples     R/var/www/html/env/lib/python3.13/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                    [         R                  " U 5      R                  n [         R                  " U S5        [	        [
        R                  SS/0 [         R                  ES[        U 5      0E[        R                  SSS9nSUR                  ;   d   e [         R                  " X5        g! [         R                  " X5        f = f)	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chmodr   sys
executableenvironstr
subprocessPIPEr   )tmp_pathmodeprocs      r   test_tmpconfigdir_warningr*      s     778$$D!
1)^^T#67=2::=~s8}=??T; &444
  s   A2B, ,Cc                 v    [        [        R                  SS/0 [        R                  ES[        U 5      0ESS9  g )Nr   zOimport pathlib; pathlib.Path.home = lambda *args: 1/0; import matplotlib.pyplotr   Tr   r   )r   r!   r"   r   r#   r$   )r'   s    r   test_importable_with_no_homer-   '   s9    	
$	% :rzz9>3x=9	Gr   c                      S n SSK JnJn  [        U " S5      5      [        UR	                  UR
                  5      5      :X  d   e[        U " S5      5      [        UR	                  UR                  5      5      :X  d   eg)zw
Test that the standard backends mentioned in the docstring of
matplotlib.use() are the same as in matplotlib.rcsetup.
c                 X   / n[         R                  R                  R                  U 5      S   R                  S5       Hc  nUR	                  5       (       d    U$ XR                  S5       Vs/ s H)  o3(       d  M  UR	                  5       R                  5       PM+     sn-  nMe     U$ s  snf )Nr   
,)r   use__doc__splitstriplower)keybackendslinees       r   parse-test_use_doc_standard_backends.<locals>.parse4   s    NN**005a8>>tDD::<< JJsOIOqq**OIIH E  Js   ,
B':"B'r   )BackendFilterbackend_registryz- interactive backends:
z- non-interactive backends:
N)matplotlib.backendsr=   r>   setlist_builtinINTERACTIVENON_INTERACTIVE)r;   r=   r>   s      r   test_use_doc_standard_backendsrD   /   s    
 D123 --m.G.GHIJ K J567 --m.K.KLMN O Nr   c                  j    Sn [        [        R                  SSU /0 [        R                  ESS0ESS9  g)	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 Tr,   N)r   r!   r"   r   r#   )programs    r   test_importable_with__OOrI   D   s;    	0  	g.,rzz,<,D
r   )r   r%   r!   pytestr   matplotlib.testingr   markparametrizer   skipifplatformgeteuidr*   r-   rD   rI    r   r   <module>rR      s    	  
   9 5 8 KK CLLG+B  DCLLG+A

0A9  ;!;D!GO*
r   