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

Function test_map

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

Source from the content-addressed store, hash-verified

1115
1116
1117def test_map():
1118 items = [4, 2, 6, 7]
1119 result = [None]
1120 pm.eval("(result, arr) => {result[0] = arr.map((x) => x * x)}")(result, items)
1121 assert items == [4, 2, 6, 7]
1122 assert result[0] == [16, 4, 36, 49]
1123
1124
1125def test_map_check_index():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected