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

Function test_array_from

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

Source from the content-addressed store, hash-verified

2548
2549
2550def test_array_from():
2551 items = [1, 2]
2552 result = [0]
2553 pm.eval("(result, arr) => { result[0] = Array.from(arr)}")(result, items)
2554 assert result[0] == [1, 2]
2555 assert result[0] is not items
2556
2557# bad index size expansion
2558

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected