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

Function test_eval_dicts_cycle

tests/python/test_dicts.py:20–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def test_eval_dicts_cycle():
21 d: dict = {"a": 1, "b": 2}
22 d["recursive"] = d
23
24 assert pm.eval("(dict) => { return dict.a; }")(d) == 1.0
25 assert pm.eval("(dict) => { return dict.b; }")(d) == 2.0
26 assert pm.eval("(dict) => { return dict.recursive; }")(d) is d["recursive"]
27
28
29def test_eval_objects():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected