Files
pyscript/core/tests/javascript/workers/test.py
Andrea Giammarchi a6b6dd8479 Refactor named workers test to avoid circular dependencies + free CI (#2212)
* Refactor named workers test to avoid circular dependencies + free CI
2024-10-08 14:58:22 +02:00

14 lines
375 B
Python

from pyscript import document, workers
async def test(name):
# retrieve sync utilities from the named worker
named = await workers[name]
# invoke the runtime_version __export__ + show it
version = await named.runtime_version()
document.body.append(version)
# flag the expectations around name done
document.documentElement.classList.add(name)