()
| 871 | |
| 872 | |
| 873 | def 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') |