From f08c8503daec5a4c72975b7455243a30431acf2a Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Mon, 15 May 2023 08:59:12 -0400 Subject: [PATCH] Assert that subplot layout is correct. --- tests/shapes/test_factory.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/shapes/test_factory.py b/tests/shapes/test_factory.py index 5a9710e8..907499da 100644 --- a/tests/shapes/test_factory.py +++ b/tests/shapes/test_factory.py @@ -30,6 +30,11 @@ def test_plot_available_shapes(self, shape_factory, monkeypatch, subset): ) axs = shape_factory.plot_available_shapes() + if subset is None or subset > 5: + assert len(axs) > 1 + else: + assert len(axs) == axs.size + populated_axs = [ax for ax in axs.flatten() if ax.get_figure()] assert len(populated_axs) == len(shape_factory.AVAILABLE_SHAPES) assert all([ax.get_xlabel() == ax.get_ylabel() == '' for ax in populated_axs])