Skip to content

Commit

Permalink
Assert that subplot layout is correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefmolin committed May 15, 2023
1 parent ae6610e commit f08c850
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/shapes/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit f08c850

Please sign in to comment.