Skip to content

Commit 72dcff7

Browse files
timtreisclaude
andcommitted
Use dpi=15 in visual test so pixelation is visible in baseline
A regression that overrides the user's DPI to the default (~100) would produce a noticeably sharper render that fails baseline comparison. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fc157ac commit 72dcff7

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

-90 KB
Binary file not shown.

tests/pl/test_show.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,13 @@ def test_plot_no_decorations(self, sdata_blobs: SpatialData):
4343
sdata_blobs.pl.render_images(element="blobs_image").pl.show(frameon=False, title="", colorbar=False)
4444

4545
def test_plot_user_ax_dpi_preserved(self, sdata_blobs: SpatialData):
46-
"""Visual test: rendering into a user-provided high-DPI ax produces correct layout (regression for #310)."""
47-
fig, ax = plt.subplots(dpi=200)
46+
"""Visual test: low DPI produces visibly pixelated rasterization (regression for #310).
47+
48+
Uses dpi=15 so the image is noticeably coarse. If the bug regresses
49+
and DPI is overridden to the default (~100), the sharper render will
50+
fail the baseline comparison.
51+
"""
52+
fig, ax = plt.subplots(dpi=15)
4853
sdata_blobs.pl.render_images(element="blobs_image").pl.show(ax=ax)
4954

5055
def test_no_plt_show_when_ax_provided(self, sdata_blobs: SpatialData):

0 commit comments

Comments
 (0)