File tree 1 file changed +7
-3
lines changed
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():
119
119
def test_imshow_pil (fig_test , fig_ref ):
120
120
style .use ("default" )
121
121
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" )
124
128
axs = fig_test .subplots (2 )
125
129
axs [0 ].imshow (PIL .Image .open (png_path ))
126
130
axs [1 ].imshow (PIL .Image .open (tiff_path ))
127
131
axs = fig_ref .subplots (2 )
128
- axs [0 ].imshow (plt .imread (str ( png_path ) ))
132
+ axs [0 ].imshow (plt .imread (png_path ))
129
133
axs [1 ].imshow (plt .imread (tiff_path ))
130
134
131
135
You can’t perform that action at this time.
0 commit comments