Files
seedsigner/tests/screenshot_generator
kdmukai a6dfb0cdc0 Fix CI crash in screenshot generator when latest-release fetch fails
The screenshot generator fetches the latest release tag at import time via an
unauthenticated GitHub API call. GitHub-hosted runners share outbound IPs and
the unauthenticated api.github.com limit is 60 req/hr/IP, so the call was
intermittently rate-limited (HTTP 403), returned (None, None), and fed None into
the mock_version_to_most_recent_release Version mock. That crashed rendering for
every locale with "TypeError: 'NoneType' object is not subscriptable" in the
OpeningSplash version string (and would likewise hit len(None) on the Version
settings screen).

Substitute a placeholder version name and timestamp when the fetch can't resolve
the latest release, so the "release build" screenshots still render instead of
feeding None into the mock. The real fetch is unchanged when it succeeds.
2026-08-09 18:23:34 -05:00
..
2023-08-03 16:43:42 -07:00
2023-08-03 16:43:42 -07:00
2026-01-20 10:20:00 -06:00

Screenshot Generator

From the project root, run:

# Generate screenshots for a specific locale
pytest tests/screenshot_generator/generator.py --locale es

# Generate screenshots for all supported locales
pytest tests/screenshot_generator/generator.py

You can also run a coverage report to see exactly what the screenshots are and are not hitting:

coverage erase
coverage run -m pytest tests/screenshot_generator/generator.py --locale es && coverage combine && coverage report

# Generate the interactive html report
coverage html

Writes the screenshots to a dir in the project root: seedsigner-screenshots.