Skip to content

Commit dd434d6

Browse files
authored
Merge pull request matplotlib#23091 from timhoffm/move-test
Move test that fig.add_axes() needs parameters
2 parents 7633da2 + 875dbf0 commit dd434d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/tests/test_figure.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ def test_figure_legend():
189189
def test_gca():
190190
fig = plt.figure()
191191

192-
with pytest.raises(TypeError):
193-
assert fig.add_axes() is None
194-
195192
ax0 = fig.add_axes([0, 0, 1, 1])
196193
with pytest.warns(
197194
MatplotlibDeprecationWarning,
@@ -476,6 +473,10 @@ def test_invalid_figure_size(width, height):
476473

477474
def test_invalid_figure_add_axes():
478475
fig = plt.figure()
476+
with pytest.raises(TypeError,
477+
match="missing 1 required positional argument: 'rect'"):
478+
fig.add_axes()
479+
479480
with pytest.raises(ValueError):
480481
fig.add_axes((.1, .1, .5, np.nan))
481482

0 commit comments

Comments
 (0)