MCPcopy Index your code
hub / github.com/pyscript/pyscript / get_display_container

Function get_display_container

core/tests/python/tests/test_display.py:12–26  ·  view source on GitHub ↗

Get the element that contains the output of the display function.

()

Source from the content-addressed store, hash-verified

10
11
12async def get_display_container():
13 """
14 Get the element that contains the output of the display function.
15 """
16 if RUNNING_IN_WORKER:
17 # Needed to ensure the DOM has time to catch up with the display calls
18 # made in the worker thread.
19 await asyncio.sleep(0.01)
20 py_display = web.page.find("script-py")
21 if len(py_display) == 1:
22 return py_display[0]
23 mpy_display = web.page.find("script-mpy")
24 if len(mpy_display) == 1:
25 return mpy_display[0]
26 return None
27
28
29async def setup():

Callers 15

setupFunction · 0.85
teardownFunction · 0.85
test_simple_displayFunction · 0.85
test_consecutive_displayFunction · 0.85
test_append_trueFunction · 0.85
test_append_falseFunction · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected