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

Skip to content

Commit e03b005

Browse files
authored
Merge pull request #10817 from anntzer/imread-from-url
Add test to imread from url.
2 parents fc73593 + cbf782d commit e03b005

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/matplotlib/tests/test_image.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
from __future__ import absolute_import, division, print_function
2-
3-
import six
4-
51
from copy import copy
62
import io
73
import os
84
import sys
5+
import urllib.request
96
import warnings
107

118
import numpy as np
@@ -630,9 +627,9 @@ def test_minimized_rasterized():
630627

631628
@pytest.mark.network
632629
def test_load_from_url():
633-
req = six.moves.urllib.request.urlopen(
634-
"http://matplotlib.org/_static/logo_sidebar_horiz.png")
635-
plt.imread(req)
630+
url = "http://matplotlib.org/_static/logo_sidebar_horiz.png"
631+
plt.imread(url)
632+
plt.imread(urllib.request.urlopen(url))
636633

637634

638635
@image_comparison(baseline_images=['log_scale_image'],

0 commit comments

Comments
 (0)