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

Function test_find_found_once

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

Source from the content-addressed store, hash-verified

1854
1855
1856def test_find_found_once():
1857 items = [5, 12, 8, 130, 44]
1858 result = [0]
1859 pm.eval("(result, arr) => {result[0] = arr.find((element) => element > 100)}")(result, items)
1860 assert items == [5, 12, 8, 130, 44]
1861 assert result[0] == 130
1862
1863
1864def test_find_found_twice():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected