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

Function test_push

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

Source from the content-addressed store, hash-verified

162
163
164def test_push():
165 items = [1, 2, 3]
166 result = [None]
167 pm.eval("(result, arr) => {result[0] = arr.push(4)}")(result, items)
168 assert items == [1, 2, 3, 4]
169 assert result[0] == 4
170
171
172def test_push_no_arg():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected