diff --git a/test/test_api/test_call_signatures.py b/test/test_api/test_call_signatures.py index 1789fb1e..ba33b94b 100644 --- a/test/test_api/test_call_signatures.py +++ b/test/test_api/test_call_signatures.py @@ -3,6 +3,7 @@ import inspect from ..helpers import TestCase from jedi import Script +from jedi import cache from jedi._compatibility import is_py33 @@ -224,3 +225,15 @@ def test_no_signature(): X()(""") assert Script(s).call_signatures() == [] assert len(Script(s, column=2).call_signatures()) == 1 + + +def test_completion_interference(): + """Seems to cause problems, see also #396.""" + cache.parser_cache.pop(None, None) + assert Script('open(').call_signatures() + assert Script('open(').call_signatures() + + # complete something usual, before doing the same call_signatures again. + assert Script('from os import ').completions() + + assert Script('open(').call_signatures()