
    h(                        S SK r S SKrS SKrS SKJ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\" S5      S 5       rg)    N)patch)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     Z/var/www/fran/franai/venv/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>.parse5   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_backendsrE   0   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__OOrJ   E   s;    	0  	g.,rzz,<,D
r   z"matplotlib.subprocess.check_outputc                     [         R                  " S/SS9U l        [        R                  " [
        R                  SS9   [
        R                  R                  S5        SSS5        g! , (       d  f       g= f)zY
Test that _get_executable_info raises ExecutableNotFoundError if the
command times out.
mock   )cmdtimeoutz	Timed out)matchinkscapeN)	r&   TimeoutExpiredside_effectpytestraisesr   ExecutableNotFoundError_get_executable_info__wrapped__)mock_check_outputs    r    test_get_executable_info_timeoutrZ   V   sR     %/$=$=6(TV$W!	z99	M''33J? 
N	M	Ms    A((
A6)r   r&   r"   unittest.mockr   rT   r   matplotlib.testingr   markparametrizer   skipifplatformgeteuidr+   r.   rE   rJ   rZ    r   r   <module>rc      s    	  
    9 5 8 KK CLLG+B  DCLLG+A

0A9  ;!;D!GO*
" +,	@ -	@r   