scipy / scipy_doctest

Floating-point aware doctesting
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

MAINT: close the figures before backend change #145

Closed ev-br closed 5 months ago

ev-br commented 5 months ago

MPL 3.8 issues a DeprecationWarning, follow its suggestion:

scpdt/tests/test_testfile.py::test_one_scipy_tutorial Auto-close()ing of figures upon backend switching is deprecated since 3.8 and will be removed two minor releases later. To suppress this warning, explicitly call plt.close('all') first. matplotlib.use('Agg')

Found while looking at gh-131

Sheila-nk commented 5 months ago

LGTM! 🚀

Sheila-nk commented 5 months ago

I'm not sure if you can see the same warning locally:

scpdt/tests/test_testfile.py::test_linalg_clone
  <doctest scipy_linalg_tutorial_clone.rst[69]>:1: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown

but is it possible to silence this warning as well in this PR or a follow-up PR?

ev-br commented 5 months ago

A follow-up sounds good.

ev-br commented 5 months ago

Thanks for the review Sheila!