Skip to content

Commit

Permalink
Formatter(black) is applied
Browse files Browse the repository at this point in the history
  • Loading branch information
i-aki-y committed Dec 8, 2023
1 parent 23449f2 commit 945af1c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/plugins/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,20 +583,18 @@ def test_file_completions(workspace, tmpdir):
# Check completions
assert len(completions) == 2
assert [c["kind"] == lsp.CompletionItemKind.File for c in completions]
assert (
completions[0]["insertText"] == (
("bar" + "\\") if os.name == "nt" else ("bar" + "/")
)
assert completions[0]["insertText"] == (
("bar" + "\\") if os.name == "nt" else ("bar" + "/")
)
assert completions[1]["insertText"] == 'foo.txt"'

# When snippets are supported, ensure that path separators are escaped.
support_snippet = {"textDocument": {"completion": {"completionItem": {"snippetSupport": True}}}}
support_snippet = {
"textDocument": {"completion": {"completionItem": {"snippetSupport": True}}}
}
doc._config.capabilities.update(support_snippet)
completions = pylsp_jedi_completions(doc._config, doc, com_position)
assert (
completions[0]["insertText"] == (
("bar" + "\\\\") if os.name == "nt" else ("bar" + "\\/")
)
assert completions[0]["insertText"] == (
("bar" + "\\\\") if os.name == "nt" else ("bar" + "\\/")
)
assert completions[1]["insertText"] == 'foo.txt"'

0 comments on commit 945af1c

Please sign in to comment.