mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-22 03:35:31 -05:00
Use <script type="py"> instead of <py-script> in most tests (#1723)
This is mostly a global search&replace, to replace <py-script> with <script type="py">. The vast majority of tests just works, some needed some tweak.
This commit is contained in:
@@ -9,7 +9,7 @@ class TestPyScriptRuntimeAttributes(PyScriptTest):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<div id="py-button-container"></div>
|
||||
<py-script>
|
||||
<script type="py">
|
||||
import js
|
||||
|
||||
py_button = Element("py-button-container")
|
||||
@@ -17,7 +17,7 @@ class TestPyScriptRuntimeAttributes(PyScriptTest):
|
||||
|
||||
def print_hello():
|
||||
js.console.log("hello pyscript")
|
||||
</py-script>
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
self.page.locator("button").click()
|
||||
@@ -28,7 +28,7 @@ class TestPyScriptRuntimeAttributes(PyScriptTest):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<button id="py-button"></button>
|
||||
<py-script>
|
||||
<script type="py">
|
||||
import js
|
||||
|
||||
py_button = Element("py-button")
|
||||
@@ -36,7 +36,7 @@ class TestPyScriptRuntimeAttributes(PyScriptTest):
|
||||
|
||||
def print_hello():
|
||||
js.console.log("hello pyscript")
|
||||
</py-script>
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
self.page.locator("button").click()
|
||||
@@ -47,7 +47,7 @@ class TestPyScriptRuntimeAttributes(PyScriptTest):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<button id="py-button">live content</button>
|
||||
<py-script>
|
||||
<script type="py">
|
||||
import js
|
||||
|
||||
py_button = Element("py-button")
|
||||
@@ -56,7 +56,7 @@ class TestPyScriptRuntimeAttributes(PyScriptTest):
|
||||
def print_hello():
|
||||
js.console.log("hello pyscript")
|
||||
py_button.element.removeAttribute("py-click")
|
||||
</py-script>
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
self.page.locator("button").click()
|
||||
|
||||
Reference in New Issue
Block a user