File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,20 @@ def test_snippets_completion(config, workspace):
318
318
assert completions [0 ]['insertTextFormat' ] == lsp .InsertTextFormat .Snippet
319
319
320
320
321
+ def test_snippets_completion_at_most (config , workspace ):
322
+ doc_snippets = 'from collections import defaultdict \n a=defaultdict'
323
+ doc = Document (DOC_URI , workspace , doc_snippets )
324
+ config .capabilities ['textDocument' ] = {
325
+ 'completion' : {'completionItem' : {'snippetSupport' : True }}}
326
+ config .update ({'plugins' : {'jedi_completion' : {'include_params' : True }}})
327
+ config .update ({'plugins' : {'jedi_completion' : {'resolve_at_most' : 0 }}})
328
+
329
+ com_position = {'line' : 1 , 'character' : len (doc_snippets )}
330
+ completions = pylsp_jedi_completions (config , doc , com_position )
331
+ assert completions [0 ]['insertText' ] == 'defaultdict'
332
+ assert not completions [0 ].get ('insertTextFormat' , None )
333
+
334
+
321
335
def test_completion_with_class_objects (config , workspace ):
322
336
doc_text = 'class FOOBAR(Object): pass\n FOOB'
323
337
com_position = {'line' : 1 , 'character' : 4 }
You can’t perform that action at this time.
0 commit comments