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 5ab99ee

Browse filesBrowse files
authored
Merge pull request #19108 from anntzer/animtests
Fix failing animation test with pytest 6.2.
2 parents 067cdee + 48c18cb commit 5ab99ee
Copy full SHA for 5ab99ee

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+4
-1
lines changed

‎lib/matplotlib/tests/test_animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_animation.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def test_animation_repr_html(writer, html, want, anim):
197197
html = anim._repr_html_()
198198
if want is None:
199199
assert html is None
200+
with pytest.warns(UserWarning):
201+
del anim # Animtion was never run, so will warn on cleanup.
200202
else:
201203
assert want in html
202204

‎lib/matplotlib/tests/test_image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_image.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ def test_load_from_url():
707707
+ ('///' if sys.platform == 'win32' else '')
708708
+ path.resolve().as_posix())
709709
plt.imread(url)
710-
plt.imread(urllib.request.urlopen(url))
710+
with urllib.request.urlopen(url) as file:
711+
plt.imread(file)
711712

712713

713714
@image_comparison(['log_scale_image'], remove_text=True)

0 commit comments

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