Fix a few more issues, mostly with the fast parser.

This commit is contained in:
Dave Halter
2016-06-13 18:21:17 +02:00
parent a485412af0
commit 27f05de3b7
5 changed files with 20 additions and 4 deletions

View File

@@ -469,3 +469,13 @@ def test_decorator_string_issue():
s = jedi.Script(source)
assert s.completions()
assert s._parser.module().get_code() == source
def test_round_trip():
source = dedent('''
def x():
"""hahaha"""
func''')
f = FastParser(load_grammar(), source)
assert f.get_parsed_node().get_code() == source

View File

@@ -146,7 +146,7 @@ class TestRegression(TestCase):
x = 0
a = \
[1, 2, 3, 4, 5, 6, 7, 8, 9, (x)] # <-- here
""", '(x)] # <-- here', [])
""", '(x)] # <-- here', ['int'])
def test_generator(self):
# Did have some problems with the usage of generator completions this