File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/python/plotly/plotly/tests/test_core/test_px Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -171,14 +171,16 @@ def test_zmin_zmax_range_color_source():
171171 assert fig1 == fig2
172172
173173
174- def test_imshow_xarray ():
174+ @pytest .mark .parametrize ("binary_string" , [False , True ])
175+ def test_imshow_xarray (binary_string ):
175176 img = np .random .random ((20 , 30 ))
176177 da = xr .DataArray (img , dims = ["dim_rows" , "dim_cols" ])
177- fig = px .imshow (da )
178+ fig = px .imshow (da , binary_string = binary_string )
178179 # Dimensions are used for axis labels and coordinates
179180 assert fig .layout .xaxis .title .text == "dim_cols"
180181 assert fig .layout .yaxis .title .text == "dim_rows"
181- assert np .all (np .array (fig .data [0 ].x ) == np .array (da .coords ["dim_cols" ]))
182+ if not binary_string :
183+ assert np .all (np .array (fig .data [0 ].x ) == np .array (da .coords ["dim_cols" ]))
182184
183185
184186def test_imshow_labels_and_ranges ():
You can’t perform that action at this time.
0 commit comments