Skip to content

Commit 65e03d7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d5e412f commit 65e03d7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/pl/test_render_images.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,22 +198,27 @@ def test_fail_when_len_palette_is_not_equal_to_len_img_channels(sdata_blobs: Spa
198198
with pytest.raises(ValueError, match="Palette length"):
199199
sdata_blobs.pl.render_images(element="blobs_image", palette=["red", "green"]).pl.show()
200200

201+
201202
def test_fail_when_len_palette_is_not_equal_to_len_user_channels(sdata_blobs: SpatialData):
202203
with pytest.raises(ValueError, match="Palette length"):
203204
sdata_blobs.pl.render_images(element="blobs_image", channel=[0, 1, 2], palette=["red", "green"]).pl.show()
204205

206+
205207
def test_fail_when_len_cmap_not_equal_len_img_channels(sdata_blobs):
206208
with pytest.raises(ValueError, match="Cmap length"):
207209
sdata_blobs.pl.render_images(element="blobs_image", cmap=["Reds", "Blues"]).pl.show()
208210

211+
209212
def test_fail_when_len_cmap_not_equal_len_user_channels(sdata_blobs):
210213
with pytest.raises(ValueError, match="Cmap length"):
211-
sdata_blobs.pl.render_images(element="blobs_image", channel=[0,1,2], cmap=["viridis", "Reds"]).pl.show()
214+
sdata_blobs.pl.render_images(element="blobs_image", channel=[0, 1, 2], cmap=["viridis", "Reds"]).pl.show()
215+
212216

213217
def test_fail_invalid_multichannel_strategy(sdata_multichannel):
214218
with pytest.raises(ValueError, match="Invalid multichannel_strategy"):
215219
sdata_multichannel.pl.render_images(element="multichannel_image", multichannel_strategy="foo").pl.show()
216220

221+
217222
def test_fail_channel_index_out_of_range(sdata_blobs):
218223
with pytest.raises(IndexError, match="channel index"):
219224
sdata_blobs.pl.render_images(element="blobs_image", channel=10).pl.show()

0 commit comments

Comments
 (0)