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 2412f76

Browse filesBrowse files
committed
Fix error message for Python 2.
1 parent f94dd9d commit 2412f76
Copy full SHA for 2412f76

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-1
lines changed

‎lib/matplotlib/tests/test_figure.py

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

367367
def test_savefig():
368368
fig = plt.figure()
369-
msg = r"savefig\(\) takes 2 positional arguments but 3 were given"
369+
if sys.version_info[0] == 3:
370+
msg = r"savefig\(\) takes 2 positional arguments but 3 were given"
371+
else:
372+
msg = r"savefig\(\) takes exactly 2 arguments \(3 given\)"
370373
with pytest.raises(TypeError, match=msg):
371374
fig.savefig("fname1.png", "fname2.png")
372375

0 commit comments

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