8000 Improve skip message for image comparison tests · matplotlib/matplotlib@8c95188 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c95188

Browse files
committed
Improve skip message for image comparison tests
1 parent 3b79f63
F0FB
 commit 8c95188

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,12 @@ def wrapper(*args, extension, request, **kwargs):
264264
kwargs['request'] = request
265265

266266
if extension not in comparable_formats():
267-
pytest.skip(f"Cannot compare {extension} files on this system")
267+
reason = {
268+
'pdf': 'because Ghostscript is not installed',
269+
'eps': 'because Ghostscript is not installed',
270+
'svg': 'because Inkscape is not installed',
271+
}.get(extension, '')
272+
pytest.skip(f"Cannot compare {extension} files {reason}")
268273

269274
img = _ImageComparisonBase(func, tol=tol, remove_text=remove_text,
270275
savefig_kwargs=savefig_kwargs)

0 commit comments

Comments
 (0)
0