MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / test_iter_for_of

Function test_iter_for_of

tests/python/test_arrays.py:2647–2652  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2645
2646
2647def test_iter_for_of():
2648 myit = iter((1, 2))
2649 result = [None, None]
2650 pm.eval("""(result, myit) => {let index = 0; for (const value of myit) {result[index++] = value}}""")(result, myit)
2651 assert result[0] == 1.0
2652 assert result[1] == 2.0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected