Skip to content

Commit 7e4e832

Browse files
committed
remove '*_range*' test, add else block
1 parent db50afd commit 7e4e832

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/matplotlib/tests/test_sphinxext.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def plot_file(num, suff=''):
276276
"*nonmatch*",
277277
"range*", "range6*",
278278
"index*,range*", "*",
279-
"*_range*", "*script*"])
279+
"*script*"])
280280
def 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')
@@ -359,10 +359,5 @@ def test_plot_exclude_patterns(tmp_path, plot_exclude_patterns):
359359
assert not (img_dir / "range6_range6.png").exists()
360360
assert not (img_dir / "range6_range10.png").exists()
361361
assert not (img_dir / "range4.png").exists()
362-
# we match against the relative path, not the function name, so this doesn't match
363-
# anything
364-
elif plot_exclude_patterns == "*_range*":
365-
assert (img_dir / "index-1.png").exists()
366-
assert (img_dir / "range6_range6.png").exists()
367-
assert (img_dir / "range6_range10.png").exists()
368-
assert (img_dir / "range4.png").exists()
362+
else:
363+
raise ValueError(f"unsure how to check {plot_exclude_patterns=}")

0 commit comments

Comments
 (0)