Show More
@@ -26,6 +26,15 b' from IPython.core.completer import (' | |||
|
26 | 26 | _deduplicate_completions, |
|
27 | 27 | ) |
|
28 | 28 | |
|
29 | if sys.version_info >= (3, 10): | |
|
30 | import jedi | |
|
31 | from pkg_resources import parse_version | |
|
32 | ||
|
33 | # Requires https://github.com/davidhalter/jedi/pull/1795 | |
|
34 | jedi_issue = parse_version(jedi.__version__) <= parse_version("0.18.0") | |
|
35 | else: | |
|
36 | jedi_issue = False | |
|
37 | ||
|
29 | 38 | # ----------------------------------------------------------------------------- |
|
30 | 39 | # Test functions |
|
31 | 40 | # ----------------------------------------------------------------------------- |
@@ -442,6 +451,8 b' class TestCompleter(unittest.TestCase):' | |||
|
442 | 451 | matches = c.all_completions("TestCl") |
|
443 | 452 | assert matches == ['TestClass'], jedi_status |
|
444 | 453 | matches = c.all_completions("TestClass.") |
|
454 | if jedi_status and jedi_issue: | |
|
455 | continue | |
|
445 | 456 | assert len(matches) > 2, jedi_status |
|
446 | 457 | matches = c.all_completions("TestClass.a") |
|
447 | 458 | assert matches == ['TestClass.a', 'TestClass.a1'], jedi_status |
@@ -496,6 +507,7 b' class TestCompleter(unittest.TestCase):' | |||
|
496 | 507 | "encoding" in c.signature |
|
497 | 508 | ), "Signature of function was not found by completer" |
|
498 | 509 | |
|
510 | @pytest.mark.xfail(jedi_issue, reason="Known failure on jedi<=0.18.0") | |
|
499 | 511 | def test_deduplicate_completions(self): |
|
500 | 512 | """ |
|
501 | 513 | Test that completions are correctly deduplicated (even if ranges are not the same) |
General Comments 0
You need to be logged in to leave comments.
Login now