diff --git a/tests/plotting/test_style.py b/tests/plotting/test_style.py index d42e1c60..8d3b1dac 100644 --- a/tests/plotting/test_style.py +++ b/tests/plotting/test_style.py @@ -15,6 +15,7 @@ def save_plot(filepath): fig, ax = plt.subplots() ax.plot([0, 1]) fig.savefig(filepath) + plt.close() @pytest.mark.parametrize('as_decorator', [False, True]) diff --git a/tests/shapes/test_factory.py b/tests/shapes/test_factory.py index eda3a10a..04bff35c 100644 --- a/tests/shapes/test_factory.py +++ b/tests/shapes/test_factory.py @@ -1,5 +1,6 @@ """Test the factory module.""" +import matplotlib.pyplot as plt import pytest @@ -41,3 +42,4 @@ def test_plot_available_shapes(self, shape_factory, monkeypatch, subset): assert {ax.get_title() for ax in populated_axs} == set( shape_factory.AVAILABLE_SHAPES ) + plt.close()