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

Method test_custom_completion_error

tests/test_completer.py:274–287  ·  view source on GitHub ↗

Test that errors from custom attribute completers are silenced.

(self)

Source from the content-addressed store, hash-verified

272 pass
273
274 def test_custom_completion_error(self):
275 """Test that errors from custom attribute completers are silenced."""
276 ip = get_ipython()
277
278 class A:
279 pass
280
281 ip.user_ns["x"] = A()
282
283 @complete_object.register(A)
284 def complete_A(a, existing_completions):
285 raise TypeError("this should be silenced")
286
287 ip.complete("x.")
288
289 def test_custom_completion_ordering(self):
290 """Test that errors from custom attribute completers are silenced."""

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
AClass · 0.70
completeMethod · 0.45

Tested by

no test coverage detected