matplotlib / pytest-mpl

A pytest plugin to facilitate image comparison for Matplotlib figures
Other
244 stars 47 forks source link

Improve error reporting when test raises an exception #193

Closed ConorMacBride closed 1 year ago

ConorMacBride commented 1 year ago

When a test function raises an exception or does not return a figure, the failure is not reported in the HTML summary. This PR makes a fallback result be logged before calling the test function, so it will appear in the HTML summary in case an exception is raised.

This PR also fixes a bug where, when in hybrid mode, a missing baseline image from a remote URL was not being recorded in the status report. This change makes the code process a baseline download failure similar to how it processes a missing local baseline file.