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

Function test_pop

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

Source from the content-addressed store, hash-verified

69
70
71def test_pop():
72 items = [1, 2, 3]
73 result = [None]
74 pm.eval("(result, arr) => {result[0] = arr.pop()}")(result, items)
75 assert items == [1, 2]
76 assert result[0] == 3
77
78
79def test_pop_empty():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected