Tests¶
pytest
End-to-end tests in tests/e2e drive the real app in headless browsers through Playwright.
They need the development requirements, and are skipped without them:
pip install -r requirements-dev.txt
playwright install --with-deps chromium webkit
pytest tests/e2e --browser chromium --browser webkit # WebKit is Safari's engine
They start the app on a free port against the test database, and need no internet: a page that asks a CDN for anything fails its test (Bootstrap is served by Nessie, see Bootstrap).
The tests need PostgreSQL: they create a separate <database>_test database next to the one in
DATABASE_URL (or use TEST_DATABASE_URL), and are skipped if it can't be reached. They never
touch the network or a real AirPlay pipe. The player tests run their own mpv with no audio
output (--ao=null), and are skipped without mpv and ffmpeg; other tests that build real audio
files need ffmpeg too.