scripts/generate_favicons.py's _parse_mark() raises ValueError in three cases - a non-square-at-origin viewBox, logo.svg no longer being exactly three <rect> children, and the stem/top-bar rects not sharing a fill color - specifically so a future edit to logo.svg that outgrows this hand-rolled parser fails loudly instead of silently drawing the wrong icon.
tests/test_generate_images.py (added in #234) only exercises the happy path (test_generate_favicons runs the real logo.svg through main() and checks output files/dimensions). None of the three error paths have a test.
Add a few cases that write a temporary malformed SVG (wrong viewBox, four rects instead of three, mismatched stem/bar fill) to a tmp file, point script.LOGO_SVG at it, and assert _parse_mark raises with the expected message. Doesn't touch logo.svg itself or its real generated output.
scripts/generate_favicons.py's_parse_mark()raisesValueErrorin three cases - a non-square-at-originviewBox,logo.svgno longer being exactly three<rect>children, and the stem/top-bar rects not sharing a fill color - specifically so a future edit tologo.svgthat outgrows this hand-rolled parser fails loudly instead of silently drawing the wrong icon.tests/test_generate_images.py(added in #234) only exercises the happy path (test_generate_faviconsruns the reallogo.svgthroughmain()and checks output files/dimensions). None of the three error paths have a test.Add a few cases that write a temporary malformed SVG (wrong viewBox, four rects instead of three, mismatched stem/bar fill) to a tmp file, point
script.LOGO_SVGat it, and assert_parse_markraises with the expected message. Doesn't touchlogo.svgitself or its real generated output.