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

Function test_access_locals_and_globals

tests/test_guarded_eval.py:908–913  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

906
907
908def test_access_locals_and_globals():
909 context = EvaluationContext(
910 locals={"local_a": "a"}, globals={"global_b": "b"}, evaluation="limited"
911 )
912 assert guarded_eval("local_a", context) == "a"
913 assert guarded_eval("global_b", context) == "b"
914
915
916@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

EvaluationContextClass · 0.90
guarded_evalFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…