Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd434d6

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

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎lib/matplotlib/tests/test_figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_figure.py
+4-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.