1
0
forked from VimPlug/jedi

Follow up from the last async issue, fixes more related things about #1092.

This commit is contained in:
Dave Halter
2018-04-24 01:02:31 +02:00
parent 8494164b22
commit ba96c21f83
2 changed files with 21 additions and 1 deletions

View File

@@ -2,6 +2,8 @@ import os
import sys
from textwrap import dedent
import pytest
def test_in_whitespace(Script):
code = dedent('''
@@ -118,3 +120,20 @@ def test_generator(Script):
def test_in_comment(Script):
assert Script(" # Comment").completions()
assert Script("max_attr_value = int(2) # Cast to int for spe").completions()
def test_async(Script, environment):
if environment.version_info < (3, 5):
pytest.skip()
code = dedent('''
foo = 3
async def x():
hey = 3
ho'''
)
print(code)
comps = Script(code, column=4).completions()
names = [c.name for c in comps]
assert 'foo' in names
assert 'hey' in names