(anim)
| 513 | |
| 514 | @pytest.mark.parametrize('anim', [dict(klass=dict)], indirect=['anim']) |
| 515 | def test_disable_cache_warning(anim): |
| 516 | cache_frame_data = True |
| 517 | frames = iter(range(5)) |
| 518 | match_target = ( |
| 519 | f"{frames=!r} which we can infer the length of, " |
| 520 | "did not pass an explicit *save_count* " |
| 521 | f"and passed {cache_frame_data=}. To avoid a possibly " |
| 522 | "unbounded cache, frame data caching has been disabled. " |
| 523 | "To suppress this warning either pass " |
| 524 | "`cache_frame_data=False` or `save_count=MAX_FRAMES`." |
| 525 | ) |
| 526 | with pytest.warns(UserWarning, match=re.escape(match_target)): |
| 527 | anim = animation.FuncAnimation( |
| 528 | **{**anim, 'cache_frame_data': cache_frame_data, 'frames': frames} |
| 529 | ) |
| 530 | assert anim._cache_frame_data is False |
| 531 | anim._init_draw() |
| 532 | |
| 533 | |
| 534 | def test_movie_writer_invalid_path(anim): |
nothing calls this directly
no test coverage detected
searching dependent graphs…