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

Function test_values_iterator

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

Source from the content-addressed store, hash-verified

2462
2463
2464def test_values_iterator():
2465 items = ['a', 'b', 'c']
2466 result = [7, 8, 9]
2467 pm.eval("""
2468 (result, arr) => {
2469 index = 0;
2470 iterator = arr.values();
2471 for (const value of iterator) {
2472 result[index] = value;
2473 index++;
2474 }
2475 }
2476 """)(result, items)
2477 assert result == ['a', 'b', 'c']
2478 assert result is not items
2479
2480# constructor property
2481

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected