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

Function test_eval_dicts_subdicts

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

Source from the content-addressed store, hash-verified

10
11
12def test_eval_dicts_subdicts():
13 d = {"a": 1, "b": {"c": 2}}
14
15 assert pm.eval("(dict) => { return dict.a; }")(d) == 1.0
16 assert pm.eval("(dict) => { return dict.b; }")(d) is d["b"]
17 assert pm.eval("(dict) => { return dict.b.c; }")(d) == 2.0
18
19
20def test_eval_dicts_cycle():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected