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 f94dd9d

Browse filesBrowse files
committed
TST: Fix incorrect call to pytest.raises. (#13194)
The `message` parameter is actually the message to print when it fails, but we want to check the exception message, which is the `match` parameter.
1 parent e9686de commit f94dd9d
Copy full SHA for f94dd9d

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/tests/test_figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_figure.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ def test_subplots_shareax_loglabels():
366366

367367
def test_savefig():
368368
fig = plt.figure()
369-
msg = "savefig() takes 2 positional arguments but 3 were given"
370-
with pytest.raises(TypeError, message=msg):
369+
msg = r"savefig\(\) takes 2 positional arguments but 3 were given"
370+
with pytest.raises(TypeError, match=msg):
371371
fig.savefig("fname1.png", "fname2.png")
372372

373373

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.