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:
@@ -34,10 +34,16 @@ The controls are in the in-game notebook (N) under Controls. The basics:
|
||||
You need Node (tested with 22), Python 3, and Playwright for the browser tests and screenshots:
|
||||
|
||||
```sh
|
||||
pip install -r requirements.txt
|
||||
python3 -m playwright install chromium
|
||||
uv venv .venv
|
||||
uv pip install --python .venv/bin/python -r requirements.txt
|
||||
.venv/bin/python -m playwright install chromium
|
||||
```
|
||||
|
||||
If uv is not installed, `python3 -m venv .venv` and
|
||||
`.venv/bin/pip install -r requirements.txt` also work; then install Chromium as above.
|
||||
After that, plain `python3` works for every command below; the browser scripts switch to
|
||||
`.venv` on their own.
|
||||
|
||||
```sh
|
||||
python3 build.py # build dist/index.html
|
||||
python3 test/run_all.py # headless test suites
|
||||
|
||||
Reference in New Issue
Block a user