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
+4 -5
View File
@@ -75,11 +75,10 @@ python3 tools/where.py 7614 # which source line is line 7614 of dist/index.
python3 tools/map.py # regenerate the index in docs/PROJECT_MAP.md
```
You need Node (tested with 22), Python 3, and Playwright for Python with Chromium
(`pip install -r requirements.txt`, then `python3 -m playwright install chromium`). Playwright
officially supports Ubuntu and Debian. On other Linux distributions, such as Arch, its bundled
Chromium usually works; if it does not, launch the system Chromium through Playwright's
`executable_path`.
You need Node (tested with 22) and Python 3. Playwright for Python and its Chromium live in
`.venv/` in the repo (not committed); set up as in README.md → Develop. The browser scripts and
`tools/shot.py` switch to `.venv` by themselves (`tools/use_venv.py`), so the commands above work
with plain `python3`.
## How the code is put together