Files
pyscript/pyscript.core/test/integration/interpreter/pyodide/sync.py
Andrea Giammarchi 0c54036466 [next] Add basic integrations tests (#1576)
* [next] WIP: Add basic integrations tests

* fix typos in  README.md

* Update README.md to specify when files are _ files ignored

---------

Co-authored-by: Fabio Pliger <fpliger@users.noreply.github.com>
2023-07-19 10:18:17 +02:00

13 lines
295 B
Python

import time
from xworker import xworker
time.sleep = xworker.sync.sleep
print("before")
time.sleep(1)
print("after")
# be sure the page knows the worker has done parsing to avoid
# unnecessary random timeouts all over the tests
xworker.window.document.documentElement.classList.add("worker")