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

Function test_flat_with_js_array

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

Source from the content-addressed store, hash-verified

2132
2133
2134def test_flat_with_js_array():
2135 items = [0, 1, 2, [3, 4]]
2136 result = [0]
2137 pm.eval("(result, arr) => {arr[1] = [10,11]; result[0] = arr.flat()}")(result, items)
2138 assert items == [0, [10, 11], 2, [3, 4]]
2139 assert result[0] == [0, 10, 11, 2, 3, 4]
2140
2141
2142def test_flat_depth_zero():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected