+
     ]i&  c                   s   R t ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIHt ^ RI	t	]	P                  ! RRR7       RR ltR tR	 t]	P                  P                  R
^ ^.4      R 4       t]	P                  P                  R
^ ^.4      R 4       tR tR# )z2Tests for tinypages build using sphinx extensions.N)Path)subprocess_run_for_testingZsphinxz4.1.3)Z
minversionc                 s>   Vf   . MTp\         P                  RRRRR\        V4      \        V 4      \        V4      .	VOp\        VRR/ \        P
                  CRR/CR	7      pVP                  pVP                  pV'       d   \        P                  ! R
V 24       R # R # )N-msphinx-W-bhtml-dT
MPLBACKEND Zcapture_outputZtextZenvz-sphinx build emitted the following warnings:
)
sys
executablestrr   osenvironstdoutstderrpytestZfail)Z
source_dirdoctree_dirhtml_dir
extra_argscmdprocouterrs   &&&&    F/usr/lib64/python3.14/site-packages/matplotlib/tests/test_sphinxext.pybuild_sphinx_htmlr      s    !)zJ>>:tT6[!3z?CMPDNPC%Dt,rzz,<,.D ++C
++C DSEJK     c                 s  aaa \         P                  ! \        \        4      P                  R ,          V RR7       V R,          R,          pVR,          oV R,          o\
        P                  RRR	RR
\        S4      \        \        \        4      P                  R ,          4      \        V4      .	p\        VRR/ \        P                  CRRR\        P                  /CR7      pVP                  pVP                  p\        V SV4       V3R loV3R lpV3R l\        ^^4       4       w  rxp	VR,          P!                  RR7      p
V R,          P#                  4       pVP%                  RR4      pV R,          P'                  V4       R Uu. uF#  pV! V4      P)                  4       P*                  NK%  	  pp\        V SV4       R# u upi )	tinypagesTZdirs_exist_ok_buildr   _imagesdoctreesr   r   r   r   r   r   ZGCOV_ERROR_FILEr	   c                 s   < SR V  R2,          # some_plots-.png )numimg_dir   &r   	plot_fileZ!test_tinypages.<locals>.plot_file:   s    ;se4000r   c                 s@   < SP                   R ,          RV  R2,          # )Zplot_directiver"   r#   )parent)r%   r   r'   r   plot_directive_fileZ+test_tinypages.<locals>.plot_directive_file=   s#    !!$44SE7NNNr   c              3   s4   <"   T F  pS! V4      x  K  	  R # 5iNr$   )Z.0ir(   s   & r   Z	<genexpr>Z!test_tinypages.<locals>.<genexpr>A   s     !D1)A,,s   zsome_plots.htmlzutf-8)Zencodingzincluded_plot_21.rsts   plt.plot(range(6))s   plt.plot(range(4))N)            )shutilcopytreer    __file__r)   r
   r   r   r   r   r   Zdevnullr   r   r   ZrangeZ	read_textZ
read_bytesZreplaceZwrite_bytesZstatZst_mtime)tmp_pathr   r   r   r   r   r*   Zrange_10Zrange_6Zrange_4Zhtml_contentsZcontentsr,   Zmodification_timesr   r&   r(   s   &             @@@r   test_tinypagesr5   #   s   
OODN))K7"&(("V+H"GZ'K>>:tT6[!tH~$${23S]DC &DtKrzzK<->

KD ++C
++C hX61O "Ea!DHw  11<<g<NM4 11==?H 57LMH&&33H= $01#/a .a0557@@#/  1hX61s   
)Gc                 s   \        \        4      P                  p\        P                  ! VR ,          V R,          4       \        P
                  ! VR,          V R,          4       V R,          pV R,          P                  R4       V R,          R,          p\        WV4       V R,          R	,          p\        WVR
R.R7       R# )tinypages/conf.pyconf.pytinypages/_static_staticr    	index.rstz#
.. plot::

    plt.plot(range(2))
r   Zhtml1Zhtml2-Dzplot_html_show_source_link=0r   Nr    r3   r)   r1   Zcopyfiler2   Z
write_textr   )r4   r)   r   Z	html_dir1Z	html_dir2s   &    r   test_plot_html_show_source_linkr>      s    (^""F
OOF00(Y2FG
OOF00(Y2FGZ'K'' )  8#g-IhY7 8#g-IhY"&(F!GIr   plot_html_show_source_linkc                 T   \        \        4      P                  p\        P                  ! VR ,          V R,          4       \        P
                  ! VR,          V R,          4       V R,          pV R,          P                  R4       V R,          R,          p\        WVR	R
V 2.R7       R# )r6   r7   r8   r9   r    r:   z?
.. plot::
    :show-source-link: true

    plt.plot(range(2))
r   r   r;   plot_html_show_source_link=r<   Nr=   r4   r?   r)   r   r      &&   r   test_show_source_link_truerD           (^""F
OOF00(Y2FG
OOF00(Y2FGZ'K'' )  ("V+HhX+,F+GHCJ Kr   c                 r@   )r6   r7   r8   r9   r    r:   z@
.. plot::
    :show-source-link: false

    plt.plot(range(2))
r   r   r;   rA   r<   Nr=   rB   rC   r   test_show_source_link_falserF      rE   r   c                 s  a \         P                  ! \        \        4      P                  R ,          V RR7       V R,          R,          pVR,          oV R,          p\        WVRR.R	7       RV3R
 llpR F  pK  	  RpRpR# )r   Tr   r   r   r   r    r;   zplot_srcset=2xr<   c                 s"   < SR V  V R2,          # r!   r$   )r%   Zsuffr&   s   &&r   r(   Z&test_srcset_version.<locals>.plot_file   s    ;seD6666r   zVsrcset="../_images/nestedpage-index-1.png, ../_images/nestedpage-index-1.2x.png 2.00x"zXsrcset="../_images/nestedpage2-index-2.png, ../_images/nestedpage2-index-2.2x.png 2.00x"N)r   )	r-   r.   r/   r0   i   i   i   i   i   )r1   r2   r    r3   r)   r   )r4   r   r   r(   ZindZstr&   s   &     @r   test_srcset_versionrG      s}    
OODN))K7"&(("V+H"GZ'KhXC  !7 /.$8B9Br   r+   )Z__doc__Zfilecmpr   Zpathlibr    r1   r
   Zmatplotlib.testingr   r   Zimportorskipr   r5   r>   ZmarkZparametrizerD   rF   rG   r$   r   r   <module>rH      s    8  	   
 9    H 1&Y.x;, 51v>: ?:& 51v>: ?:&&Sr   