Commit febed7d
committed
Display relative image paths when tests fail.
Before the PR, an image comparison failure was reported as
```
E matplotlib.testing.exceptions.ImageComparisonFailure: images not close: /home/antony/src/extern/matplotlib/result_images/test_axes/pcolormesh_svg.png vs. /home/antony/src/extern/matplotlib/result_images/test_axes/pcolormesh-expected_svg.png (RMS 0.001)
```
This PR changes it to
```
E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.001):
E result_images/test_axes/pcolormesh_svg.png
E result_images/test_axes/pcolormesh-expected_svg.png
```
which I believe more legible.
(It would be nice to just display a single path but parts of the testing
machinery seem to accept arbitrary image paths, not necessarily in the
same folder, even though this is not done in practice.)1 parent 70831bd commit febed7d
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | | - | |
208 | | - | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
0 commit comments