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

Function test_autoimport_module

tests/test_guarded_eval.py:1010–1019  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1008
1009
1010def test_autoimport_module():
1011 context = EvaluationContext(
1012 locals={},
1013 globals={},
1014 evaluation="limited",
1015 auto_import=import_module,
1016 policy_overrides={"allow_auto_import": True},
1017 )
1018 pi = guarded_eval("math.pi", context)
1019 assert round(pi, 2) == 3.14
1020
1021
1022def test_autoimport_deep_module():

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…