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

Function test_guards_locals_and_globals

tests/test_guarded_eval.py:896–905  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

894
895
896def test_guards_locals_and_globals():
897 context = EvaluationContext(
898 locals={"local_a": "a"}, globals={"global_b": "b"}, evaluation="minimal"
899 )
900
901 with pytest.raises(GuardRejection):
902 guarded_eval("local_a", context)
903
904 with pytest.raises(GuardRejection):
905 guarded_eval("global_b", context)
906
907
908def test_access_locals_and_globals():

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…