Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d0ec0e

Browse filesBrowse files
committed
TST: Correctly skip missing distillers
When a distiller is not found, that step is simply skipped by `_try_distill`, so these tests were not actually skipped as intended.
1 parent 740c5d7 commit 5d0ec0e
Copy full SHA for 5d0ec0e

File tree

Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed

‎lib/matplotlib/tests/test_backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_ps.py
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@
4040
'eps with usetex'
4141
])
4242
def test_savefig_to_stringio(format, use_log, rcParams, orientation, papersize):
43+
if rcParams.get("ps.usedistiller") == "ghostscript":
44+
try:
45+
mpl._get_executable_info("gs")
46+
except mpl.ExecutableNotFoundError as exc:
47+
pytest.skip(str(exc))
48+
elif rcParams.get("ps.userdistiller") == "xpdf":
49+
try:
50+
mpl._get_executable_info("pdftops")
51+
except mpl.ExecutableNotFoundError as exc:
52+
pytest.skip(str(exc))
53+
4354
mpl.rcParams.update(rcParams)
4455

4556
fig, ax = plt.subplots()
@@ -55,8 +66,6 @@ def test_savefig_to_stringio(format, use_log, rcParams, orientation, papersize):
5566
title += " \N{MINUS SIGN}\N{EURO SIGN}"
5667
ax.set_title(title)
5768
allowable_exceptions = []
58-
if rcParams.get("ps.usedistiller"):
59-
allowable_exceptions.append(mpl.ExecutableNotFoundError)
6069
if rcParams.get("text.usetex"):
6170
allowable_exceptions.append(RuntimeError)
6271
if rcParams.get("ps.useafm"):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.