mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
* Fix #2114 - Cleanup the test folder + automation * Merged both test and tests into a single folder
20 lines
542 B
Python
20 lines
542 B
Python
from pyscript import document, workers
|
|
|
|
|
|
async def test(interpreter):
|
|
# accessed as item
|
|
named = await workers.micropython_version
|
|
|
|
version = await named.micropython_version()
|
|
document.body.append(version)
|
|
document.body.append(document.createElement("hr"))
|
|
|
|
# accessed as attribute
|
|
named = await workers["pyodide_version"]
|
|
|
|
version = await named.pyodide_version()
|
|
document.body.append(version)
|
|
document.body.append(document.createElement("hr"))
|
|
|
|
document.documentElement.classList.add(interpreter)
|