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

Function test_current_target

core/tests/python/tests/test_current_target.py:10–19  ·  view source on GitHub ↗

The current_target function should return the expected target element's id.

()

Source from the content-addressed store, hash-verified

8
9
10def test_current_target():
11 """
12 The current_target function should return the expected target element's id.
13 """
14 expected = "py-0"
15 if is_micropython:
16 expected = "mpy-w1-target" if RUNNING_IN_WORKER else "mpy-0"
17 elif RUNNING_IN_WORKER:
18 expected = "py-w1-target"
19 assert current_target() == expected, f"Expected {expected} got {current_target()}"

Callers

nothing calls this directly

Calls 1

current_targetFunction · 0.90

Tested by

no test coverage detected