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

Function test_flat_depth_two

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

Source from the content-addressed store, hash-verified

2155
2156
2157def test_flat_depth_two():
2158 items = [0, 1, [2, [3, [4, 5]]]]
2159 result = [0]
2160 pm.eval("(result, arr) => {result[0] = arr.flat(2)}")(result, items)
2161 assert items == [0, 1, [2, [3, [4, 5]]]]
2162 assert result[0] == [0, 1, 2, 3, [4, 5]]
2163
2164
2165def test_flat_depth_large():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected