Commit afdd890
committed
Use test cache for test result images too.
For image comparison tests in svg/pdf/ps formats, the result images are
converted to png for comparison. Previously the conversion results were
cached for the baseline images, but not for the test-generated images
(because of non-deterministic svg/pdf/etc. results, due to
hash-salting, dict ordering, etc.).
Now that the test-generated images are generally deterministic, we can
enable the cache for baseline images as well. This speeds up
`pytest -k '[svg]'` by ~30% (81s initially -> 55s on a seeded cache) and
`pytest -k '[pdf]'` by ~10% (62s -> 55s) (there are too few (e)ps image
comparison tests to see an effect). Also add logging regarding the
cache which may help troubleshooting determinacy problems.
This is a much simpler version of PR7764, which added more sophisticated
reporting of cache hits and misses, as well as cache invalidation (I
think the cache can reasonably be cleaned manually, at least for now).1 parent db7cd7e commit afdd890
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| 298 | + | |
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
| |||
382 | 387 | | |
383 | 388 | | |
384 | 389 | | |
385 | | - | |
| 390 | + | |
386 | 391 | | |
387 | 392 | | |
388 | 393 | | |
| |||
0 commit comments