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

Function test_flat

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

Source from the content-addressed store, hash-verified

2124
2125
2126def test_flat():
2127 items = [0, 1, 2, [3, 4]]
2128 result = [0]
2129 pm.eval("(result, arr) => {result[0] = arr.flat()}")(result, items)
2130 assert items == [0, 1, 2, [3, 4]]
2131 assert result[0] == [0, 1, 2, 3, 4]
2132
2133
2134def test_flat_with_js_array():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected