Fix #1777 - Export also PyWorker and current_target (#1779)

This commit is contained in:
Andrea Giammarchi
2023-10-02 16:02:34 +02:00
committed by GitHub
parent bc1cac9c41
commit a08f891b20
4 changed files with 14 additions and 4 deletions

View File

@@ -6,6 +6,16 @@ from .support import PyScriptTest, skip_worker, only_main
class TestBasic(PyScriptTest):
def test_pyscript_exports(self):
self.pyscript_run(
"""
<script type="py">
from pyscript import RUNNING_IN_WORKER, PyWorker, window, document, sync, current_target
</script>
"""
)
assert self.console.error.lines == []
def test_script_py_hello(self):
self.pyscript_run(
"""