File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -119,13 +119,17 @@ def test_image_python_io():
119119def test_imshow_pil (fig_test , fig_ref ):
120120 style .use ("default" )
121121 PIL = pytest .importorskip ("PIL" )
122- png_path = Path (__file__ ).parent / "baseline_images/pngsuite/basn3p04.png"
123- tiff_path = Path (__file__ ).parent / "baseline_images/test_image/uint16.tif"
122+ # Pillow<=6.0 fails to open pathlib.Paths on Windows (pillow#3823), and
123+ # Matplotlib's builtin png opener doesn't handle them either.
124+ png_path = str (
125+ Path (__file__ ).parent / "baseline_images/pngsuite/basn3p04.png" )
126+ tiff_path = str (
127+ Path (__file__ ).parent / "baseline_images/test_image/uint16.tif" )
124128 axs = fig_test .subplots (2 )
125129 axs [0 ].imshow (PIL .Image .open (png_path ))
126130 axs [1 ].imshow (PIL .Image .open (tiff_path ))
127131 axs = fig_ref .subplots (2 )
128- axs [0 ].imshow (plt .imread (str ( png_path ) ))
132+ axs [0 ].imshow (plt .imread (png_path ))
129133 axs [1 ].imshow (plt .imread (tiff_path ))
130134
131135
You can’t perform that action at this time.
0 commit comments