diff --git a/tests/test_parse.py b/tests/test_parse.py index f53e38c..c8db01b 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -214,16 +214,16 @@ curr_line = 1 curr_column = 1 for token in all_tokens: - token.location = parse.ParseLocation(curr_line, curr_column, filename) space = draw(draw_whitespace()) new_code = token.code + space lines = new_code.split("\n") + code += new_code + token.location = parse.ParseLocation(curr_line, curr_column, filename) + curr_line += len(lines) - 1 if len(lines) > 1: - curr_line += len(lines) - 1 curr_column = len(lines[-1]) + 1 else: curr_column += len(new_code) - code += new_code eof = SampleToken(None, "EOF", None) eof.location = parse.ParseLocation(curr_line, curr_column - 1, filename) return SampleSoup(all_tokens + [eof], code, filename)