Fix issues with interpreter completions on unittest.mock.

For 3.6+ an error was ignored that lead to crashes. In 3.5 the OOM killer
eventually arrived...

Fixes #1415
This commit is contained in:
Dave Halter
2019-12-05 10:09:16 +01:00
parent cf65ecdb96
commit 54f4bd0bad
3 changed files with 50 additions and 3 deletions

View File

@@ -466,10 +466,10 @@ def test__wrapped__():
assert c.line == syslogs_to_df.__wrapped__.__code__.co_firstlineno + 1
@pytest.mark.parametrize('module_name', ['sys', 'time'])
@pytest.mark.parametrize('module_name', ['sys', 'time', 'unittest.mock'])
def test_core_module_completes(module_name):
module = import_module(module_name)
assert jedi.Interpreter(module_name + '.\n', [locals()]).completions()
assert jedi.Interpreter('module.', [locals()]).completions()
@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL")