mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
remove pys-on* and py-on* attributes (#1361)
* remove pys-on* and py-on* attributes * update changelog * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix eslint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -301,26 +301,6 @@ class TestBasic(PyScriptTest):
|
||||
== 'print("hello world!")\n'
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="pys-onClick is broken, we should kill it, see #1213")
|
||||
def test_pys_onClick_shows_deprecation_warning(self):
|
||||
self.pyscript_run(
|
||||
"""
|
||||
<button id="1" pys-onClick="myfunc()">Click me</button>
|
||||
<py-script>
|
||||
def myfunc():
|
||||
print("hello world")
|
||||
|
||||
</py-script>
|
||||
"""
|
||||
)
|
||||
banner = self.page.locator(".alert-banner")
|
||||
expected_message = (
|
||||
"The attribute 'pys-onClick' and 'pys-onKeyDown' are "
|
||||
"deprecated. Please 'py-click=\"myFunction()\"' or "
|
||||
"'py-keydown=\"myFunction()\"' instead."
|
||||
)
|
||||
assert banner.inner_text() == expected_message
|
||||
|
||||
def test_py_attribute_without_id(self):
|
||||
self.pyscript_run(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user