-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
classicIssues only applicable to PyScript versions 2023.05.1 and earlier ("PyScript Classic")Issues only applicable to PyScript versions 2023.05.1 and earlier ("PyScript Classic")
Description
This is a follow-up of #1333 (once it's merged).
It seems that for some reason, error and warning banners don't appear when we run in a worker. There are 3 tests which are skipped because of that:
pyscript/pyscriptjs/tests/integration/test_01_basic.py
Lines 152 to 170 in ef0e838
| @skip_worker("FIXME: the banner doesn't appear") | |
| def test_non_existent_package(self): | |
| self.pyscript_run( | |
| """ | |
| <py-config> | |
| packages = ["nonexistendright"] | |
| </py-config> | |
| """, | |
| wait_for_pyscript=False, | |
| ) | |
| expected_alert_banner_msg = ( | |
| "(PY1001): Unable to install package(s) 'nonexistendright'. " | |
| "Unable to find package in PyPI. Please make sure you have " | |
| "entered a correct package name." | |
| ) | |
| alert_banner = self.page.wait_for_selector(".alert-banner") | |
| assert expected_alert_banner_msg in alert_banner.inner_text() |
pyscript/pyscriptjs/tests/integration/test_01_basic.py
Lines 172 to 189 in ef0e838
| @skip_worker("FIXME: the banner doesn't appear") | |
| def test_no_python_wheel(self): | |
| self.pyscript_run( | |
| """ | |
| <py-config> | |
| packages = ["opsdroid"] | |
| </py-config> | |
| """, | |
| wait_for_pyscript=False, | |
| ) | |
| expected_alert_banner_msg = ( | |
| "(PY1001): Unable to install package(s) 'opsdroid'. " | |
| "Reason: Can't find a pure Python 3 Wheel for package(s) 'opsdroid'" | |
| ) | |
| alert_banner = self.page.wait_for_selector(".alert-banner") | |
| assert expected_alert_banner_msg in alert_banner.inner_text() |
pyscript/pyscriptjs/tests/integration/test_01_basic.py
Lines 274 to 289 in ef0e838
| @skip_worker("FIXME: showWarning()") | |
| def test_assert_no_banners(self): | |
| """ | |
| Test that the DOM doesn't contain error/warning banners | |
| """ | |
| self.pyscript_run( | |
| """ | |
| <py-script> | |
| from _pyscript_js import showWarning | |
| showWarning("hello") | |
| showWarning("world") | |
| </py-script> | |
| """ | |
| ) | |
| with pytest.raises(AssertionError, match="Found 2 alert banners"): | |
| self.assert_no_banners() |
Metadata
Metadata
Assignees
Labels
classicIssues only applicable to PyScript versions 2023.05.1 and earlier ("PyScript Classic")Issues only applicable to PyScript versions 2023.05.1 and earlier ("PyScript Classic")