forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 855332a
Fixed SVG-as-text image comparison tests.
SVG-as-text tests make make the figure background transparent, but its colour (i.e. under the transparent mask) is actually black. Before the expected and actual images are compared, they are converted from RGBA to RGB, which makes them both completely black (since the text is also black). As a result, the test passes even if the expected and actual images differ. Not ignoring the transparency layer fixes this problem: discard the transparency layer (if any) only if the image is opaque.1 parent 40dea5a commit 855332a
File tree
2 files changed
+814
-753
lines changed- lib/matplotlib
- testing
- tests/baseline_images/test_bbox_tight
2 files changed
+814
-753
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
371 | 371 |
| |
372 | 372 |
| |
373 | 373 |
| |
374 | + | ||
375 | + | ||
376 | + | ||
377 | + | ||
378 | + | ||
379 | + | ||
380 | + | ||
381 | + | ||
382 | + | ||
383 | + | ||
374 | 384 |
| |
375 | 385 |
| |
376 | 386 |
| |
| |||
435 | 445 |
| |
436 | 446 |
| |
437 | 447 |
| |
438 | - | ||
439 | - | ||
440 | - | ||
448 | + | ||
449 | + | ||
450 | + | ||
441 | 451 |
| |
442 | 452 |
| |
443 | 453 |
| |
| |||
486 | 496 |
| |
487 | 497 |
| |
488 | 498 |
| |
489 | - | ||
490 | - | ||
491 | - | ||
499 | + | ||
500 | + | ||
492 | 501 |
| |
493 | 502 |
| |
494 | 503 |
| |
|
0 commit comments