3030
3131# total number of plot_*.py files in tinybuild/examples + examples_rst_index
3232# + examples_with_rst
33- N_EXAMPLES = 14 + 3 + 2
33+ N_EXAMPLES = 15 + 3 + 2
3434N_FAILING = 2
3535N_GOOD = N_EXAMPLES - N_FAILING # galleries that run w/o error
3636# passthroughs examples_rst_index, examples_with_rst
@@ -289,6 +289,7 @@ def test_image_formats(sphinx_app):
289289 thumb_fnames = ['../_images/sphx_glr_plot_svg_thumb.svg' ,
290290 '../_images/sphx_glr_plot_numpy_matplotlib_thumb.png' ,
291291 '../_images/sphx_glr_plot_animation_thumb.gif' ,
292+ '../_images/sphx_glr_plot_webp_thumb.webp' ,
292293 ]
293294 for thumb_fname in thumb_fnames :
294295 file_fname = op .join (generated_examples_dir , thumb_fname )
@@ -300,7 +301,8 @@ def test_image_formats(sphinx_app):
300301 for ex , ext , nums , extra in (
301302 ('plot_svg' , 'svg' , [1 ], None ),
302303 ('plot_numpy_matplotlib' , 'png' , [1 ], None ),
303- ('plot_animation' , 'png' , [1 , 3 ], 'function Animation' )):
304+ ('plot_animation' , 'png' , [1 , 3 ], 'function Animation' ),
305+ ('plot_webp' , 'webp' , [1 ], None )):
304306 html_fname = op .join (generated_examples_dir , '%s.html' % ex )
305307 with codecs .open (html_fname , 'r' , 'utf-8' ) as fid :
306308 html = fid .read ()
@@ -314,7 +316,8 @@ def test_image_formats(sphinx_app):
314316 (ex , num , ext ))
315317 file_fname2 = op .join (generated_examples_dir , img_fname2 )
316318 want_html = f'srcset="{ img_fname0 } , { img_fname2 } 2.00x"'
317- if ext in ('png' , 'jpg' , 'svg' ): # check 2.00x (tests directive)
319+ if ext in ('png' , 'jpg' , 'svg' , 'webp' ):
320+ # check 2.00x (tests directive)
318321 assert op .isfile (file_fname2 ), file_fname2
319322 assert want_html in html
320323
0 commit comments