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:
Antonio Cuni
2023-09-19 16:35:15 +00:00
committed by GitHub
parent f6decfd93d
commit 77b40aa348
20 changed files with 375 additions and 332 deletions

View File

@@ -22,12 +22,12 @@ class TestPyTerminal(PyScriptTest):
"""
<py-terminal></py-terminal>
<py-script>
<script type="py">
import sys
print('hello world')
print('this goes to stderr', file=sys.stderr)
print('this goes to stdout')
</py-script>
</script>
"""
)
term = self.page.locator("py-terminal")
@@ -54,7 +54,7 @@ class TestPyTerminal(PyScriptTest):
"""
<py-terminal id="term1"></py-terminal>
<py-script>
<script type="py">
import js
print('one')
term2 = js.document.createElement('py-terminal')
@@ -63,7 +63,7 @@ class TestPyTerminal(PyScriptTest):
print('two')
print('three')
</py-script>
</script>
"""
)
term1 = self.page.locator("#term1")
@@ -115,9 +115,9 @@ class TestPyTerminal(PyScriptTest):
terminal = true
</py-config>
<py-script>
<script type="py">
print('hello world')
</py-script>
</script>
"""
)
term = self.page.locator("py-terminal")
@@ -167,13 +167,13 @@ class TestPyTerminal(PyScriptTest):
<py-config>
xterm = true
</py-config>
<py-script>
<script type="py">
print("\x1b[33mYellow\x1b[0m")
print("\x1b[4mUnderline\x1b[24m")
print("\x1b[1mBold\x1b[22m")
print("\x1b[3mItalic\x1b[23m")
print("done")
</py-script>
</script>
"""
)
@@ -242,10 +242,10 @@ class TestPyTerminal(PyScriptTest):
<py-config>
xterm = true
</py-config>
<py-script>
<script type="py">
print("\x1b[33mYellow\x1b[0m")
print("done")
</py-script>
</script>
<py-terminal id="a"></py-terminal>
<py-terminal id="b" data-testid="b"></py-terminal>
"""