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

Method test_policy_warnings

tests/test_completer.py:1614–1627  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1612 ip.user_ns.pop("r", None)
1613
1614 def test_policy_warnings(self):
1615 with self.assertWarns(
1616 UserWarning,
1617 msg="Override 'allowed_getattr_external' is not valid with 'unsafe' evaluation policy",
1618 ):
1619 with evaluation_policy("unsafe", allowed_getattr_external=[]):
1620 pass
1621
1622 with self.assertWarns(
1623 UserWarning,
1624 msg="Override 'test' is not valid with 'limited' evaluation policy",
1625 ):
1626 with evaluation_policy("limited", test=[]):
1627 pass
1628
1629 def test_dict_key_completion_bytes(self):
1630 """Test handling of bytes in dict key completion"""

Callers

nothing calls this directly

Calls 1

evaluation_policyFunction · 0.85

Tested by

no test coverage detected