Commit 27d1949
committed
Better error reporting on failure of cache_frame_data test.
This avoids an obscure pytest assertion failure
```
> assert weakref_assertion_fn(f())
E assert False
E + where False = <function <lambda> at 0x7f49d8bfdb80>(None)
E + where None = <weakref at 0x7f49d76c3360; dead>()
```
if refactoring animation and causing the test to fail. One now gets
```
# If cache_frame_data is True, then the weakref should be alive;
# if cache_frame_data is False, then the weakref should be dead (None).
> assert (f() is None) != cache_frame_data
E assert (None is None) != True
E + where None = <weakref at 0x7f4a3416c7c0; dead>()
```1 parent b459bc7 commit 27d1949
1 file changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 240 | + | |
| 241 | + | |
247 | 242 | | |
248 | 243 | | |
249 | 244 | | |
| |||
282 | 277 | | |
283 | 278 | | |
284 | 279 | | |
285 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
0 commit comments