No project description provided
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_ipywidgets-1.57.2.tar.gz.
File metadata
- Download URL: pytest_ipywidgets-1.57.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aed7188960fb866ab95752d6b65d604c5dd6a64c445443fcee3e4f468f01d72
|
|
| MD5 |
b6c581a4fcdc0385363021fb58daeaae
|
|
| BLAKE2b-256 |
4243d049429561bff6ea7ddbb0a12c97f9e7d3a2f4c4a1867265be5a31f6363f
|
Provenance
The following attestation bundles were made for pytest_ipywidgets-1.57.2.tar.gz:
Publisher:
test.yaml on widgetti/solara
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_ipywidgets-1.57.2.tar.gz -
Subject digest:
3aed7188960fb866ab95752d6b65d604c5dd6a64c445443fcee3e4f468f01d72 - Sigstore transparency entry: 908184194
- Sigstore integration time:
-
Permalink:
widgetti/solara@fb2a2655ed253a5fe1f9c03572a6ab9cd59b12c1 -
Branch / Tag:
refs/tags/v1.57.2 - Owner: https://github.com/widgetti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yaml@fb2a2655ed253a5fe1f9c03572a6ab9cd59b12c1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_ipywidgets-1.57.2-py3-none-any.whl.
File metadata
- Download URL: pytest_ipywidgets-1.57.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9735d85c52267cbb0136c97b886f8abc9d07677212efc58769b549364c4f24fb
|
|
| MD5 |
754fe64a6f7177565e52b50e9f377e0d
|
|
| BLAKE2b-256 |
b0789b1bd5adb6c5c2a47d915899ea6bfed30d9888146ea592d5fe35019fdf36
|
Provenance
The following attestation bundles were made for pytest_ipywidgets-1.57.2-py3-none-any.whl:
Publisher:
test.yaml on widgetti/solara
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_ipywidgets-1.57.2-py3-none-any.whl -
Subject digest:
9735d85c52267cbb0136c97b886f8abc9d07677212efc58769b549364c4f24fb - Sigstore transparency entry: 908184209
- Sigstore integration time:
-
Permalink:
widgetti/solara@fb2a2655ed253a5fe1f9c03572a6ab9cd59b12c1 -
Branch / Tag:
refs/tags/v1.57.2 - Owner: https://github.com/widgetti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yaml@fb2a2655ed253a5fe1f9c03572a6ab9cd59b12c1 -
Trigger Event:
push
-
Statement type: