Test that completions are correctly deduplicated (even if ranges are not the same)
(self)
| 567 | strict=True, |
| 568 | ) |
| 569 | def test_deduplicate_completions(self): |
| 570 | """ |
| 571 | Test that completions are correctly deduplicated (even if ranges are not the same) |
| 572 | """ |
| 573 | ip = get_ipython() |
| 574 | ip.ex( |
| 575 | textwrap.dedent( |
| 576 | """ |
| 577 | class Z: |
| 578 | zoo = 1 |
| 579 | """ |
| 580 | ) |
| 581 | ) |
| 582 | with provisionalcompleter(): |
| 583 | ip.Completer.use_jedi = True |
| 584 | l = list( |
| 585 | _deduplicate_completions("Z.z", ip.Completer.completions("Z.z", 3)) |
| 586 | ) |
| 587 | ip.Completer.use_jedi = False |
| 588 | |
| 589 | assert len(l) == 1, "Completions (Z.z<tab>) correctly deduplicate: %s " % l |
| 590 | assert l[0].text == "zoo" # and not `it.accumulate` |
| 591 | |
| 592 | @pytest.mark.xfail( |
| 593 | sys.version_info.releaselevel in ("alpha",), |
nothing calls this directly
no test coverage detected