Run browser tests locally: Playwright 1.64.1 in .venv, scripts switch to it on their own

The browser tests and screenshot tools now work with plain python3 on a machine whose
system Python refuses pip installs: tools/use_venv.py re-runs them with the repo's .venv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 16:50:15 -04:00
co-authored by Claude Opus 5.5
parent 3f971a94c2
commit cab9343b26
13 changed files with 64 additions and 9 deletions
+2
View File
@@ -4,6 +4,8 @@ light and glow), the pixel upload and blit, and one simulation tick, in ms. Rebu
python3 tools/perf.py
"""
import sys, pathlib
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
from use_venv import ensure_playwright; ensure_playwright()
from playwright.sync_api import sync_playwright
root = pathlib.Path(__file__).resolve().parent.parent
url = (root / 'dist' / 'index.html').as_uri()