mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
committed by
GitHub
parent
a1281d1331
commit
92643539cf
51
pyscriptjs/tests/integration/test_script_type.py
Normal file
51
pyscriptjs/tests/integration/test_script_type.py
Normal file
@@ -0,0 +1,51 @@
|
||||
from .support import PyScriptTest, skip_worker
|
||||
|
||||
|
||||
class TestDisplayLineBreak(PyScriptTest):
|
||||
@skip_worker("FIXME: there is no document in a worker")
|
||||
def test_display_line_break(self):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<script type="py-script">
|
||||
display('hello\nworld')
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
text_content = self.page.locator("py-script-tag").text_content()
|
||||
assert "hello\nworld" == text_content
|
||||
|
||||
@skip_worker("FIXME: there is no document in a worker")
|
||||
def test_amp(self):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<script type="py-script">
|
||||
display('a & b')
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
text_content = self.page.locator("py-script-tag").text_content()
|
||||
assert "a & b" == text_content
|
||||
|
||||
@skip_worker("FIXME: there is no document in a worker")
|
||||
def test_quot(self):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<script type="py-script">
|
||||
display('a " b')
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
text_content = self.page.locator("py-script-tag").text_content()
|
||||
assert "a " b" == text_content
|
||||
|
||||
@skip_worker("FIXME: there is no document in a worker")
|
||||
def test_lt_gt(self):
|
||||
self.pyscript_run(
|
||||
r"""
|
||||
<script type="py-script">
|
||||
display('< < > >')
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
text_content = self.page.locator("py-script-tag").text_content()
|
||||
assert "< < > >" == text_content
|
||||
Reference in New Issue
Block a user