Test that errors from custom attribute completers are silenced.
(self)
| 287 | ip.complete("x.") |
| 288 | |
| 289 | def test_custom_completion_ordering(self): |
| 290 | """Test that errors from custom attribute completers are silenced.""" |
| 291 | ip = get_ipython() |
| 292 | |
| 293 | _, matches = ip.complete("in") |
| 294 | assert matches.index("input") < matches.index("int") |
| 295 | |
| 296 | def complete_example(a): |
| 297 | return ["example2", "example1"] |
| 298 | |
| 299 | ip.Completer.custom_completers.add_re("ex*", complete_example) |
| 300 | _, matches = ip.complete("ex") |
| 301 | assert matches.index("example2") < matches.index("example1") |
| 302 | |
| 303 | def test_unicode_completions(self): |
| 304 | ip = get_ipython() |
nothing calls this directly
no test coverage detected