8000 Unskip some tests, delete others by antocuni · Pull Request #1742 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

Unskip some tests, delete others #1742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Sep 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix the test and improve the skip message
  • Loading branch information
antocuni committed Sep 21, 2023
commit 335d59b6b431222a198350751cf3922db2b063a0
8000
4 changes: 2 additions & 2 deletions pyscript.core/tests/integration/test_script_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ def test_script_type_py_src_attribute(self):
)
assert self.console.log.lines[-1] == "hello from foo"

@pytest.mark.skip("FIXME: test failure is unrelated")
@pytest.mark.skip("FIXME: wait_for_pyscript is broken")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume wait_for_pyscript is broken for the same execution-order reasons? Or is it more generally broken? Again, really just curious for later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume wait_for_pyscript is broken for the same execution-order reasons? Or is it more generally broken?

yes, it's the same problem.
The problem is that the current version of wait_for_pyscript() waits for PyScript Ready which is printed before the tags are executed, not after.

Basically right now all the tests are at risk of being flaky, but most of them are just fast enough that they work in practice.

def test_script_type_py_worker_attribute(self):
self.writefile("foo.py", "print('hello from foo')")
self.pyscript_run(
"""
<script type="py" worker="foo.py"></script>
<script type="py" src="foo.py" worker></script>
"""
)
assert self.console.log.lines[-1] == "hello from foo"
Expand Down
0