+
     ]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P                  ^ 8X  g   Q R
V RV R24       hV'       d   \        P                  ! RV 24       VP                  4       '       g   Q hR # )N-msphinx-W-bhtml-dT
MPLBACKEND Zcapture_outputZtextZenvz!sphinx build failed with stdout:
z	
stderr:
Z
z-sphinx build emitted the following warnings:
)sys
executablestrr   osenvironstdoutstderrZ
returncodepytestZfailZis_dir)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??a E
,SESEDE
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	\         P"                  ! VS! ^4      4      '       g   Q h\         P"                  ! V	S! ^4      4      '       g   Q h\         P"                  ! VS! ^4      4      '       g   Q h\         P"                  ! VS! R4      4      '       g   Q h\         P"                  ! VS! R4      4      '       g   Q h\         P"                  ! V	S! ^4      4      '       g   Q hVR,          P%                  RR7      p
RV
9   g   Q h\         P"                  ! V	SR,          4      '       g   Q h\         P"                  ! VSR,          4      '       g   Q hRV
9   g   Q hRV
9   g   Q hRV
9   g   Q hRV
9   g   Q hRV
9   g   Q hV
P'                  R4      ^8X  g   Q h\         P"                  ! VS! ^4      4      '       g   Q h\         P"                  ! VSR ,          4      '       g   Q h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       P0                  NK%  	  pp\        V SV4       \         P"                  ! V	S! ^4      4      '       g   Q hV! ^4      P/                  4       P0                  V^ ,          8X  g   Q hV! ^4      P/                  4       P0                  V^,          8X  g   Q hV! ^4      P/                  4       P0                  V^,          8X  g   Q h\         P"                  ! VS! ^4      4      '       g   Q h\         P"                  ! VS! ^4      4      '       g   Q h\         P"                  ! V	S! ^4      4      '       g   Q hV! ^4      P/                  4       P0                  V^,          8  g   Q h\         P"                  ! VS! ^4      4      '       g   Q h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12_00Z12_01some_plots.htmlutf-8Zencodingz# Only a commentz
range4.pngzrange6_range6.pngz This is the caption for plot 15.z7Plot 17 uses the caption option,
with multi-line input.z3Plot 17 uses the alt option, with multi-line input.z This is the caption for plot 18.z&plot-directive my-class my-other-classz#This caption applies to both plots.zrange6_range10.pngz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rangefilecmpZcmp	read_textZcountZ
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_tinypagesr:   #   sK   
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;;w	!----;;w	!----;;x2////;;x7!34444;;w	' 23333;;w	".... 11<<g<NM...;;w, 67777;;w*= =>>>>->>> FVVV@MQQQ->>>3}DDDDEJJJ ;;w	"....;;x+?!?@@@@ 11==?H 57LMH&&33H= $01#/a .a0557@@#/  1hX6;;w	".... q!&&(115G5JJJJq!&&(115G5JJJJq!&&(115G5JJJJ;;x1....;;w	!----;;w	!---- q!&&(114Fq4IIII;;w	!----!1s   )S8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P                  R	4      4      4      ^8X  g   Q hV R,          R
,          p\        WVRR.R7       \        \        VP                  R	4      4      4      ^ 8X  g   Q hR# )tinypages/conf.pyconf.pytinypages/_static_staticr    	index.rstz#
.. plot::

    plt.plot(range(2))
r   Zhtml1**/index-1.pyZhtml2-Dzplot_html_show_source_link=0r   Nr    r6   r)   r4   Zcopyfiler5   Z
write_textr   ZlenZlistZglob)r9   r)   r   Z	html_dir1Z	html_dir2s   &    r   test_plot_html_show_source_linkrD      s    (^""F
OOF00(Y2FG
OOF00(Y2FGZ'K'' )  8#g-IhY7tINN?345::: 8#g-IhY"&(F!GItINN?345:::r   plot_html_show_source_linkc                 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R	R
V 2.R7       \        \        VP                  R4      4      4      ^8X  g   Q hR# )r;   r<   r=   r>   r    r?   z?
.. plot::
    :show-source-link: true

    plt.plot(range(2))
r   r   rA   plot_html_show_source_link=rB   r@   NrC   r9   rE   r)   r   r      &&   r   test_show_source_link_truerI           (^""F
OOF00(Y2FG
OOF00(Y2FGZ'K'' )  ("V+HhX+,F+GHCJ KtHMM/234999r   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R	R
V 2.R7       \        \        VP                  R4      4      4      ^ 8X  g   Q hR# )r;   r<   r=   r>   r    r?   z@
.. plot::
    :show-source-link: false

    plt.plot(range(2))
r   r   rA   rF   rB   r@   NrC   rG   rH   r   test_show_source_link_falserK      rJ   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 FA  pV! V4      P                  4       '       g   Q hV! VRR7      P                  4       '       d   KA  Q h	  SR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hSR,          P                  4       '       g   Q hRVR,          P                  RR7      9   g   Q hRpWQR,          P                  RR7      9   g   Q hRpWQR,          P                  RR7      9   g   Q hR# ) r   Tr   r   r   r   r    rA   zplot_srcset=2xrB   c                 s"   < SR V  V R2,          # r!   r$   )r%   suffr&   s   &&r   r(   Z&test_srcset_version.<locals>.plot_file   s    ;seD6666r   z.2x)rL   znestedpage-index-1.pngznestedpage-index-1.2x.pngznestedpage-index-2.pngznestedpage-index-2.2x.pngznestedpage2-index-1.pngznestedpage2-index-1.2x.pngznestedpage2-index-2.pngznestedpage2-index-2.2x.pngzDsrcset="_images/some_plots-1.png, _images/some_plots-1.2x.png 2.00x"r-   r.   r/   zVsrcset="../_images/nestedpage-index-1.png, ../_images/nestedpage-index-1.2x.png 2.00x"znestedpage/index.htmlzXsrcset="../_images/nestedpage2-index-2.png, ../_images/nestedpage2-index-2.2x.png 2.00x"znestedpage2/index.htmlN)r   )	r0   r1   r2   r3   i   i   i   i   i   )r4   r5   r    r6   r)   r   Zexistsr8   )r9   r   r   r(   ZindZstr&   s   &     @r   test_srcset_versionrM      s   
OODN))K7"&(("V+H"GZ'KhXC  !7 /~$$&&&&5)002222 / ..6688881199;;;;..6688881199;;;;//77999922::<<<<//77999922::<<<< S,,777IJ K J8B44???QQQQ9B55@@'@RRRRr   r+   )Z__doc__r7   r   Zpathlibr    r4   r
   Zmatplotlib.testingr   r   Zimportorskipr   r:   rD   ZmarkZparametrizerI   rK   rM   r$   r   r   <module>rN      s    8  	   
 9    H 1&Y.x;, 51v>: ?:& 51v>: ?:&&Sr   