MCPcopy Index your code
hub / github.com/ipython/ipython / test_dict

Function test_dict

tests/test_guarded_eval.py:215–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214
215def test_dict():
216 context = limited(data={"a": 1, "b": {"x": 2}, ("x", "y"): 3})
217 assert guarded_eval('data["a"]', context) == 1
218 assert guarded_eval('data["b"]', context) == {"x": 2}
219 assert guarded_eval('data["b"]["x"]', context) == 2
220 assert guarded_eval('data["x", "y"]', context) == 3
221
222 assert guarded_eval("data.keys", context)
223
224
225def test_set():

Callers

nothing calls this directly

Calls 1

guarded_evalFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…