Skip to content

Commit

Permalink
TST: add test for error
Browse files Browse the repository at this point in the history
  • Loading branch information
jklymak committed Oct 15, 2021
1 parent 53f142e commit 5d37e45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Expand Up @@ -4936,6 +4936,13 @@ def test_shared_with_aspect_3():
assert round(expected, 4) == round(ax.get_aspect(), 4)


def test_shared_aspect_error():
fig, axes = plt.subplots(1, 2, sharex=True, sharey=True)
axes[0].axis("equal")
with pytest.raises(RuntimeError, match=r"set_aspect\(..., adjustable="):
fig.draw_without_rendering()


@pytest.mark.parametrize('twin', ('x', 'y'))
def test_twin_with_aspect(twin):
fig, ax = plt.subplots()
Expand Down

0 comments on commit 5d37e45

Please sign in to comment.