(tmp_path)
| 409 | |
| 410 | |
| 411 | def test_exhausted_animation(tmp_path): |
| 412 | fig, ax = plt.subplots() |
| 413 | |
| 414 | def update(frame): |
| 415 | return [] |
| 416 | |
| 417 | anim = animation.FuncAnimation( |
| 418 | fig, update, frames=iter(range(10)), repeat=False, |
| 419 | cache_frame_data=False |
| 420 | ) |
| 421 | |
| 422 | anim.save(tmp_path / "test.gif", writer='pillow') |
| 423 | |
| 424 | with pytest.warns(UserWarning, match="exhausted"): |
| 425 | anim._start() |
| 426 | |
| 427 | |
| 428 | def test_no_frame_warning(): |