A pytest plugin for testing applications that use Pyodide (Python in the browser). Current version 0.59.1, requires Python >=3.11. Active development with frequent releases.
pip install pytest-pyodideVerified import paths — ran on the pinned version, not inferred.
Minimal test using run_in_pyodide decorator.
Use selenium fixture or switch to Playwright driver.
Replace 'selenium' with 'webdriver' or configure Playwright.
Add required packages in the decorator: @run_in_pyodide(packages=['numpy', 'pandas'])
Use fixtures to set up shared state explicitly.
Ensure you are in the correct Python environment and run: pip install pytest-pyodide
Install selenium (pip install selenium) or use the Playwright driver: pip install playwright && playwright install
Change decorator to @run_in_pyodide(packages=['pandas'])