Test ipywidgets with playwright and pytest.
Installation
pip install "pytest-ipywidgets[all]"
(Note that the optional [all] installs all dependencies, including compatible versions of notebook, jupyterlab and voila.)
Usage
Using solara-server (in-process)
If you want to test your ipywidgets with playwright in-process, you can use the solara_test fixture, use display to
show your widget in the browser.
import ipywidgets as widgets
import playwright.sync_api
from IPython.display import display
def test_widget_button_solara(solara_test, page_session: playwright.sync_api.Page):
# this all runs in-process
button = widgets.Button(description="Click Me!")
def change_description(obj):
button.description = "Tested event"
button.on_click(change_description)
display(button)
button_sel = page_session.locator("text=Click Me!")
button_sel.wait_for()
button_sel.click()
page_session.locator("text=Tested event").wait_for()
Testing in the main Jupyter Environments (Notebook, Lab, Voila & Solara)
See https://solara.dev/documentation/advanced/howto/testing for more information.
Release files for pytest-ipywidgets 1.62.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_ipywidgets-1.62.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_ipywidgets-1.62.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / pytest_ipywidgets-1.62.0.tar.gz
| Download URL | pytest_ipywidgets-1.62.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88ca9f496dd6959d00b2fa5b035861ed381570e425e4626109e942ce7a9ce346
|
|
BLAKE2b-256 checksum How to use checksums |
b7feb943014d29d39551591bc54f163ec47d3271e1332b86979baf0317186fe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pytest_ipywidgets-1.62.0-py3-none-any.whl
| Download URL | pytest_ipywidgets-1.62.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
906e471535edd1cfbe0b696f09d3cc7359238f810e5f6fe9dba74d0d4c4e6c97
|
|
BLAKE2b-256 checksum How to use checksums |
2fad3e5c00a7d2214dbc5ea6acf76f33bf8d887c59fdf701c3d5a94f36dc01cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log