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

Function test_iterator_last_next

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

Source from the content-addressed store, hash-verified

2523
2524
2525def test_iterator_last_next():
2526 items = [1, 2]
2527 result = [0]
2528 pm.eval("""
2529 (result, arr) => {
2530 let iterator = arr[Symbol.iterator]();
2531 iterator.next();
2532 iterator.next();
2533 result[0] = iterator.next();
2534 }
2535 """)(result, items)
2536 assert result[0].value is None
2537 assert result[0].done
2538
2539
2540def test_iterator_iterator():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected