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:
Antonio Cuni
2023-09-25 16:14:20 +00:00
committed by GitHub
parent 801c63947a
commit b9a1227e47
9 changed files with 39 additions and 557 deletions

View File

@@ -167,7 +167,6 @@ class TestBasic(PyScriptTest):
"C true false",
"D <div></div>"]
@pytest.mark.skip(reason="FIX TEST: Works on CHROME")
def test_packages(self):
self.pyscript_run(
"""
@@ -188,8 +187,6 @@ class TestBasic(PyScriptTest):
"hello asciitree", # printed by us
]
# TODO: if there's no <script type="py"> there are surely no plugins neither
# this test must be discussed or rewritten to make sense now
@pytest.mark.skip("FIXME: No banner")
def test_non_existent_package(self):
self.pyscript_run(
@@ -197,6 +194,9 @@ class TestBasic(PyScriptTest):
<py-config>
packages = ["i-dont-exist"]
</py-config>
<script type="py">
print('hello')
</script>
""",
wait_for_pyscript=False,
)
@@ -211,8 +211,6 @@ class TestBasic(PyScriptTest):
assert expected_alert_banner_msg in alert_banner.inner_text()
self.check_py_errors("Can't fetch metadata for 'i-dont-exist'")
# TODO: if there's no <script type="py"> there are surely no plugins neither
# this test must be discussed or rewritten to make sense now
@pytest.mark.skip("FIXME: No banner")
def test_no_python_wheel(self):
self.pyscript_run(
@@ -220,6 +218,9 @@ class TestBasic(PyScriptTest):
<py-config>
packages = ["opsdroid"]
</py-config>
<script type="py">
print('hello')
</script>
""",
wait_for_pyscript=False,
)
@@ -350,7 +351,6 @@ class TestBasic(PyScriptTest):
assert script_py_tag.evaluate("node => node.srcCode") == 'print("hello from script py")'
@pytest.mark.skip(reason="FIX TEST: works in chrome!")
def test_py_attribute_without_id(self):
self.pyscript_run(
"""