mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-22 11:45:28 -05:00
Unskip some tests, delete others (#1742)
Clean up a bit the testsuite and integration tests. Highlights: - Some of the @skipped tests just worked -- I unskipped them - some worked after some small tweak to adapt to the new pyscript next - some are still skipped, but I tweaked the skip message to be more precise and descriptive - Moreover, I killed/removed the ones which no longer make sense in the context of pyscript next; in particular, I removed all the ones which tested Element (which is now gone) and the one which tested py-config features which are no longer needed (e.g., multiple interpreters). The testsuite passes locally.
This commit is contained in:
@@ -3,11 +3,6 @@ from playwright.sync_api import expect
|
||||
|
||||
from .support import PyScriptTest, skip_worker
|
||||
|
||||
pytest.skip(
|
||||
reason="FIX TESTS: These tests should reflect new PyScript and remove/change css ",
|
||||
allow_module_level=True,
|
||||
)
|
||||
|
||||
|
||||
class TestStyle(PyScriptTest):
|
||||
def test_pyscript_not_defined(self):
|
||||
@@ -15,12 +10,11 @@ class TestStyle(PyScriptTest):
|
||||
doc = """
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="build/pyscript.css" />
|
||||
<link rel="stylesheet" href="build/core.css" />
|
||||
</head>
|
||||
<body>
|
||||
<py-config>hello</py-config>
|
||||
<script type="py">hello</script>
|
||||
<py-repl>hello</py-repl>
|
||||
<py-script>hello</script>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
@@ -28,20 +22,3 @@ class TestStyle(PyScriptTest):
|
||||
self.goto("test-not-defined-css.html")
|
||||
expect(self.page.locator("py-config")).to_be_hidden()
|
||||
expect(self.page.locator("py-script")).to_be_hidden()
|
||||
expect(self.page.locator("py-repl")).to_be_hidden()
|
||||
|
||||
@skip_worker("FIXME: display()")
|
||||
def test_pyscript_defined(self):
|
||||
"""Test elements have visibility that should"""
|
||||
self.pyscript_run(
|
||||
"""
|
||||
<py-config>
|
||||
name = "foo"
|
||||
</py-config>
|
||||
<script type="py">display("hello")</script>
|
||||
<py-repl>display("hello")</py-repl>
|
||||
"""
|
||||
)
|
||||
expect(self.page.locator("py-config")).to_be_hidden()
|
||||
expect(self.page.locator("py-script")).to_be_visible()
|
||||
expect(self.page.locator("py-repl")).to_be_visible()
|
||||
|
||||
Reference in New Issue
Block a user