+
     ]i(  c                   s   ^ RI t ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIHt ]P                  P                  R. RO4      R 4       t]P                  P                  ]P                  R8H  RR7      ]P                  P                  ]P                  R8g  ;'       d    ] P                  ! 4       ^ 8H  R	R7      R
 4       4       tR tR tR t]! R4      R 4       tR# )    N)patch)subprocess_run_for_testingzversion_str, version_tuplec                 s@    \         P                  ! V 4      V8X  g   Q hR # )N)
matplotlibZ_parse_to_version_info)Zversion_strZversion_tuples   &&G/usr/lib64/python3.14/site-packages/matplotlib/tests/test_matplotlib.pytest_parse_to_version_infor      s     ,,[9]JJJ    Zwin32z%chmod() doesn't work as is on Windows)Zreasonzchmod() doesn't work as rootc                s   \         P                  ! V 4      P                  p \         P                  ! V ^ 4       \	        \
        P                  RR./ \         P                  CR\        V 4      /C\        P                  RRR7      pRVP                  9   g   Q h \         P                  ! W4       R#   \         P                  ! Y4       i ; i)zETest that a warning is emitted if a temporary configdir must be used.-czimport matplotlibMPLCONFIGDIRT)envstderrZtextcheckzset the MPLCONFIGDIRN)osZstatZst_modeZchmodr   sys
executableenvironstr
subprocessZPIPEr
   )tmp_pathZmodeZprocs   &  r   test_tmpconfigdir_warningr      s     778$$D!
1)^^T#67=2::=~s8}=??T; &444
  s   A6B1 1C	c                 s~    \        \        P                  R R./ \        P                  CR\        V 4      /CRR7       R# )r   zOimport pathlib; pathlib.Path.home = lambda *args: 1/0; import matplotlib.pyplotr   Tr	   r   N)r   r   r   r   r   r   )r      &r   test_importable_with_no_homer   (   s9    	
$	% :rzz9>3x=9	Gr   c                 s   R p ^ RI HpHp \        V ! R4      4      \        VP	                  VP
                  4      4      8X  g   Q h\        V ! R4      4      \        VP	                  VP                  4      4      8X  g   Q hR# )zw
Test that the standard backends mentioned in the docstring of
matplotlib.use() are the same as in matplotlib.rcsetup.
c                 sj   . p\         P                  P                  P                  V 4      ^,          P                  R4       Fh  pVP	                  4       '       g    V# YP                  R4       Uu. uF*  q3'       g   K  VP	                  4       P                  4       NK,  	  up,          pKj  	  V# u upi )   Z
Z,)r   ZuseZ__doc__ZsplitZstripZlower)ZkeyZbackendsZlineZes   &   r   parseZ-test_use_doc_standard_backends.<locals>.parse5   s    NN**005a8>>tDD::<< JJsOIOqq**OIIH E  Js   1	B0?"B0)BackendFilterbackend_registryz- interactive backends:
z- non-interactive backends:
N)Zmatplotlib.backendsr   r   ZsetZlist_builtinZINTERACTIVEZNON_INTERACTIVE)r   r   r   s      r   test_use_doc_standard_backendsr   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                 sr    Rp \        \        P                  RRV ./ \        P                  CRR/CRR7       R# )	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   Z
MPLBACKENDZ Tr   N)r   r   r   r   r   )Zprograms    r   test_importable_with__OOr   E   s;    	0  	g.,rzz,<,D
r   z"matplotlib.subprocess.check_outputc                s   \         P                  ! R.^R7      V n        \        P                  ! \
        P                  RR7      ;_uu_ 4        \
        P                  P                  R4       RRR4       R#   + '       g   i     R# ; i)zY
Test that _get_executable_info raises ExecutableNotFoundError if the
command times out.
Zmock)ZcmdZtimeoutz	Timed out)ZmatchZinkscapeN)	r   ZTimeoutExpiredZside_effectpytestZraisesr   ZExecutableNotFoundErrorZ_get_executable_infoZ__wrapped__)Zmock_check_outputr   r    test_get_executable_info_timeoutr   V   sX     %/$=$=6(TV$W!	z99	M	M''33J? 
N	M	M	Ms    A77B	))z3.5.0)      r    Zfinalr    )z3.5.0rc2)r   r    r    Z	candidatei   )z3.5.0.dev820+g6768ef8c4c)r   r    r    alpha4  )z3.5.0.post820+g6768ef8c4c)r   r    r   r!   r"   )r   r   r   Zunittest.mockr   r   r   Zmatplotlib.testingr   ZmarkZparametrizer   ZskipifZplatformZgeteuidr   r   r   r   r   ) r   r   <module>r#      s    	  
    9 5 8 KK CLLG+B  DCLLG+AA

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