@@ -274,9 +274,9 @@ def plot_file(num, suff=''):
274274@pytest .mark .parametrize ('plot_exclude_patterns' , [False , "*index*" ,
275275 "index*" , "ndex*" , "?ndex*" ,
276276 "*nonmatch*" ,
277- "* range*" , "* range6*" ,
278- "* index*,* range*" , "*" ,
279- "*_range*" , "*script*" , "" ])
277+ "range*" , "range6*" ,
278+ "index*,range*" , "*" ,
279+ "*_range*" , "*script*" ])
280280def test_plot_exclude_patterns (tmp_path , plot_exclude_patterns ):
281281 # test that modifying plot_exclude_patterns in config leads to skipping files
282282 shutil .copyfile (tinypages / 'conf.py' , tmp_path / 'conf.py' )
@@ -328,7 +328,7 @@ def test_plot_exclude_patterns(tmp_path, plot_exclude_patterns):
328328 # from the name of the script containing the plotting function), and thus doesn't
329329 # match. ndex* doesn't match because we're not matching substrings, and thus need
330330 # wildcards for missing characters
331- if plot_exclude_patterns in ["*script*" , "*nonmatch*" , False , "" , " ndex*" ]:
331+ if plot_exclude_patterns in ["*script*" , "*nonmatch*" , False , "ndex*" ]:
332332 assert (img_dir / "index-1.png" ).exists ()
333333 assert (img_dir / "range6_range6.png" ).exists ()
334334 assert (img_dir / "range6_range10.png" ).exists ()
@@ -342,19 +342,19 @@ def test_plot_exclude_patterns(tmp_path, plot_exclude_patterns):
342342 assert (img_dir / "range4.png" ).exists ()
343343 # name of the script used by the plot directive in the scripts rst files all match
344344 # this pattern and thus are all skipped
345- elif plot_exclude_patterns == "* range*" :
345+ elif plot_exclude_patterns == "range*" :
346346 assert (img_dir / "index-1.png" ).exists ()
347347 assert not (img_dir / "range6_range6.png" ).exists ()
348348 assert not (img_dir / "range6_range10.png" ).exists ()
349349 assert not (img_dir / "range4.png" ).exists ()
350350 # matches the name of one script, but not the other
351- elif plot_exclude_patterns == "* range6*" :
351+ elif plot_exclude_patterns == "range6*" :
352352 assert (img_dir / "index-1.png" ).exists ()
353353 assert not (img_dir / "range6_range6.png" ).exists ()
354354 assert not (img_dir / "range6_range10.png" ).exists ()
355355 assert (img_dir / "range4.png" ).exists ()
356356 # matches all relative paths, so no images created.
357- elif plot_exclude_patterns in ["* index*,* range*" , "*" ]:
357+ elif plot_exclude_patterns in ["index*,range*" , "*" ]:
358358 assert not (img_dir / "index-1.png" ).exists ()
359359 assert not (img_dir / "range6_range6.png" ).exists ()
360360 assert not (img_dir / "range6_range10.png" ).exists ()
0 commit comments