test: add pytest.importorskip for cairosvg-dependent tests

Gracefully skips figment tests when system Cairo library is unavailable
instead of crashing with opaque OSError during test collection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 11:23:35 -07:00
parent 2bfd3a01da
commit d5e5f39404
3 changed files with 12 additions and 0 deletions

View File

@@ -2,6 +2,10 @@
import os
import pytest
pytest.importorskip("cairosvg", reason="cairosvg requires system Cairo library")
from engine.figment_render import rasterize_svg
FIXTURE_SVG = os.path.join(os.path.dirname(__file__), "fixtures", "test.svg")