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

Function test_subscript

tests/test_guarded_eval.py:937–945  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

935
936
937def test_subscript():
938 context = EvaluationContext(
939 locals={}, globals={}, evaluation="limited", in_subscript=True
940 )
941 empty_slice = slice(None, None, None)
942 assert guarded_eval("", context) == tuple()
943 assert guarded_eval(":", context) == empty_slice
944 assert guarded_eval("1:2:3", context) == slice(1, 2, 3)
945 assert guarded_eval(':, "a"', context) == (empty_slice, "a")
946
947
948def test_unbind_method():

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…