Skip to content

Commit 3d63309

Browse files
timtreisclaude
andcommitted
Add legend placement tests and use CI-generated baselines
Replace local macOS baselines with CI-generated (Linux) images for the 5 existing channel legend tests. Add 2 new visual tests for legend positioning (upper left, lower right) to verify legend_loc is respected by the channel legend. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c43161d commit 3d63309

8 files changed

Lines changed: 10 additions & 0 deletions
71.4 KB
Loading
71.8 KB
Loading
-2.91 KB
Loading
-2.89 KB
Loading
1.45 KB
Loading
-1.42 KB
Loading
-1.71 KB
Loading

tests/pl/test_render_images.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,16 @@ def test_plot_channels_as_categories_with_cmap_list(self, sdata_blobs: SpatialDa
524524
channels_as_categories=True,
525525
).pl.show()
526526

527+
def test_plot_channels_as_categories_legend_upper_left(self, sdata_blobs: SpatialData):
528+
sdata_blobs.pl.render_images(element="blobs_image", channel=[0, 1], channels_as_categories=True).pl.show(
529+
legend_loc="upper left"
530+
)
531+
532+
def test_plot_channels_as_categories_legend_lower_right(self, sdata_blobs: SpatialData):
533+
sdata_blobs.pl.render_images(element="blobs_image", channel=[0, 1], channels_as_categories=True).pl.show(
534+
legend_loc="lower right"
535+
)
536+
527537

528538
class TestChannelsAsCategoriesNonVisual:
529539
"""Non-visual tests for channels_as_categories edge cases."""

0 commit comments

Comments
 (0)