1
0
forked from VimPlug/jedi

Fix issues with flows in the fast parser.

This commit is contained in:
Dave Halter
2015-01-28 17:06:18 +01:00
parent b8c63f366c
commit e412694fa2
2 changed files with 22 additions and 11 deletions

View File

@@ -106,8 +106,6 @@ def test_positions():
def test_if():
# Empty the parser cache for the path None.
cache.parser_cache.pop(None, None)
src = dedent('''\
def func():
x = 3
@@ -124,6 +122,15 @@ def test_if():
assert [d.name for d in jedi.Script(src, 8, 6).goto_definitions()] == ['int']
def test_if_simple():
src = dedent('''\
if 1:
a = 3
''')
check_fp(src + 'a', 1)
check_fp(src + "else:\n a = ''\na", 1)
def test_incomplete_function():
source = '''return ImportErr'''