Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit138df72
committed
Use test cache for test result images too.
For image comparison tests in svg/pdf/ps formats, the result images areconverted to png for comparison. Previously the conversion results werecached for the baseline images, but not for the test-generated images(because of non-deterministic svg/pdf/etc. results, due tohash-salting, dict ordering, etc.).Now that the test-generated images are generally deterministic, we canenable 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 imagecomparison tests to see an effect). Also add logging regarding thecache which may help troubleshooting determinacy problems.A simple cache eviction mechanism prevents the cache from growingwithout bounds, limiting it to 2x the size of the baseline_imagesdirectory.This is a much simpler version of PR7764, which added more sophisticatedreporting of cache hits and misses and cache eviction.1 parent34f99a9 commit138df72
1 file changed
+35
-1
lines changedLines changed: 35 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| 6 | + | |
6 | 7 |
| |
| 8 | + | |
7 | 9 |
| |
8 | 10 |
| |
9 | 11 |
| |
| |||
19 | 21 |
| |
20 | 22 |
| |
21 | 23 |
| |
| 24 | + | |
| 25 | + | |
22 | 26 |
| |
23 | 27 |
| |
24 | 28 |
| |
| |||
285 | 289 |
| |
286 | 290 |
| |
287 | 291 |
| |
| 292 | + | |
288 | 293 |
| |
289 | 294 |
| |
290 | 295 |
| |
| 296 | + | |
291 | 297 |
| |
292 | 298 |
| |
293 | 299 |
| |
| 300 | + | |
294 | 301 |
| |
295 | 302 |
| |
296 | 303 |
| |
| 304 | + | |
297 | 305 |
| |
298 | 306 |
| |
299 | 307 |
| |
300 | 308 |
| |
301 | 309 |
| |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
302 | 336 |
| |
303 | 337 |
| |
304 | 338 |
| |
| |||
387 | 421 |
| |
388 | 422 |
| |
389 | 423 |
| |
390 |
| - | |
| 424 | + | |
391 | 425 |
| |
392 | 426 |
| |
393 | 427 |
| |
|
0 commit comments
Comments
(0)