mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Fix svg errors on the page caused by <py-script> (#1464)
This commit is contained in:
committed by
GitHub
parent
b8c2d6b05d
commit
89d5d5c7db
@@ -247,7 +247,7 @@ class TestDisplay(PyScriptTest):
|
||||
self.pyscript_run(
|
||||
"""
|
||||
<div id="circle-div"></div>
|
||||
<py-script>
|
||||
<script type="py">
|
||||
class Circle:
|
||||
r = 0
|
||||
def _repr_svg_(self):
|
||||
@@ -262,7 +262,7 @@ class TestDisplay(PyScriptTest):
|
||||
display(circle, target="circle-div", append=False)
|
||||
circle.r += 5
|
||||
display(circle, target="circle-div", append=False)
|
||||
</py-script>
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
innerhtml = self.page.locator("id=circle-div").inner_html()
|
||||
@@ -270,6 +270,7 @@ class TestDisplay(PyScriptTest):
|
||||
innerhtml
|
||||
== '<svg height="20" width="20"><circle cx="10" cy="10" r="10" fill="red"></circle></svg>' # noqa: E501
|
||||
)
|
||||
assert self.console.error.lines == []
|
||||
|
||||
@skip_worker("FIXME: display()")
|
||||
def test_display_list_dict_tuple(self):
|
||||
|
||||
Reference in New Issue
Block a user