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

Function test_iter_reentrace_next

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

Source from the content-addressed store, hash-verified

2632
2633
2634def test_iter_reentrace_next():
2635 myit = iter((1, 2))
2636 result = [None]
2637 pm.eval("(result, arr) => {result[0] = arr}")(result, myit)
2638 next(result[0]) == 1
2639 next(result[0]) == 2
2640 try:
2641 third = next(result[0])
2642 assert (False)
2643 except StopIteration as e:
2644 assert (True)
2645
2646
2647def test_iter_for_of():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected