MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_load_from_url

Function test_load_from_url

lib/matplotlib/tests/test_image.py:873–881  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

871
872
873def test_load_from_url():
874 path = Path(__file__).parent / "baseline_images/pngsuite/basn3p04.png"
875 url = ('file:'
876 + ('///' if sys.platform == 'win32' else '')
877 + path.resolve().as_posix())
878 with pytest.raises(ValueError, match="Please open the URL"):
879 plt.imread(url)
880 with urllib.request.urlopen(url) as file:
881 plt.imread(file)
882
883
884@image_comparison(['log_scale_image'], remove_text=True, style='_classic_test')

Callers

nothing calls this directly

Calls 2

PathClass · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…