Description
This is the sister issue of #1761.
We currently have 14 tests marked as @skip_worker
The goal of this issue is to give a rough explanation, try to group them into categories and serve as a starting point for further discussion, and to decide which ones we want to absolutely fix before the final release, and which ones can wait.
I expect that some of them will be uncontroversial, others will require more discussion, so depending on the case we might want to open separate sub-issues for them.
Missing error messages
These are all cases in which we display a nice error banner when we run in the main thread, but not when running in a worker:
pyscript/pyscript.core/tests/integration/test_01_basic.py
Lines 87 to 111 in c6aaacd
pyscript/pyscript.core/tests/integration/test_01_basic.py
Lines 281 to 294 in c6aaacd
pyscript/pyscript.core/tests/integration/test_when.py
Lines 152 to 178 in c6aaacd
problems related to display()
-
when we are inside a worker,
display()
doesn't take into account thetarget
attribute of its surrounding tag:pyscript/pyscript.core/tests/integration/test_02_display.py
Lines 75 to 93 in c6aaacd
-
these are for a different case:
display(..., target=x)
works fine isx
points to e.g. a div, but not if it points to a<script type="py">
tag. Note that this works in the main thread, not in the worker:
pyscript/pyscript.core/tests/integration/test_02_display.py
Lines 95 to 112 in c6aaacd
pyscript/pyscript.core/tests/integration/test_02_display.py
Lines 114 to 136 in c6aaacd
pyscript/pyscript.core/tests/integration/test_02_display.py
Lines 191 to 206 in c6aaacd
-
this is another case of
display(..., target=...)
not working:
pyscript/pyscript.core/tests/integration/test_02_display.py
Lines 441 to 464 in c6aaacd
misc
-
matplotlib-pyodide seems to have problems inside workers, we need to investigate:
pyscript/pyscript.core/tests/integration/test_02_display.py
Lines 356 to 385 in c6aaacd
-
this is a sub issue, worth its own discussion:
Should workers support py-* events? #1763 -
test_escaping_of_angle_brackets
has a very weird behavior:
Fix escaping of <py-script> #1764