Small fixes to make the tests pass again.

This commit is contained in:
Dave Halter
2016-06-11 16:50:05 +02:00
parent 4c711339dd
commit 9930ab5056
2 changed files with 5 additions and 3 deletions

View File

@@ -86,8 +86,6 @@ def annotation_forward_reference(b: "B") -> "B":
#? B()
b
#? B()
annotation_forward_reference(1)
#? ["test_element"]
annotation_forward_reference(1).t
@@ -95,6 +93,9 @@ class B:
test_element = 1
pass
#? B()
annotation_forward_reference(1)
class SelfReference:
test_element = 1

View File

@@ -184,7 +184,8 @@ class IntegrationTestCase(object):
def definition(correct, correct_start, path):
should_be = set()
for match in re.finditer('(?:[^ ]+)', correct):
parser = Parser(load_grammar(), match.string, start_symbol='eval_input')
string = match.group(0)
parser = Parser(load_grammar(), string, start_symbol='eval_input')
parser.position_modifier.line = self.line_nr
element = parser.get_parsed_node()
element.parent = script._parser.user_scope()