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

Function test_flat_depth_one

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

Source from the content-addressed store, hash-verified

2147
2148
2149def test_flat_depth_one():
2150 items = [0, 1, [2, [3, [4, 5]]]]
2151 result = [0]
2152 pm.eval("(result, arr) => {result[0] = arr.flat(1)}")(result, items)
2153 assert items == [0, 1, [2, [3, [4, 5]]]]
2154 assert result[0] == [0, 1, 2, [3, [4, 5]]]
2155
2156
2157def test_flat_depth_two():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected