Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb7c722

Browse files
committed
Backport PR #19108: Fix failing animation test with pytest 6.2.
1 parent 766c965 commit cb7c722

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/tests/test_image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,8 @@ def test_load_from_url():
718718
+ ('///' if sys.platform == 'win32' else '')
719719
+ path.resolve().as_posix())
720720
plt.imread(url)
721-
plt.imread(urllib.request.urlopen(url))
721+
with urllib.request.urlopen(url) as file:
722+
plt.imread(file)
722723

723724

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

0 commit comments

Comments
 (0)