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

Function test_rejects_custom_properties

tests/test_guarded_eval.py:112–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111
112def test_rejects_custom_properties():
113 class BadProperty:
114 @property
115 def iloc(self):
116 return [None]
117
118 series = BadProperty()
119 context = limited(data=series)
120
121 with pytest.raises(GuardRejection):
122 guarded_eval("data.iloc[0]", context)
123
124
125@dec.skip_without("pandas")

Callers

nothing calls this directly

Calls 2

guarded_evalFunction · 0.90
BadPropertyClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…