Clean up a lexing test
This commit is contained in:
parent
952ca3a727
commit
a338e4c323
@ -240,22 +240,18 @@ def test_lex_bad_attrs():
|
||||
with lexe(): tokenize(":hello.foo")
|
||||
|
||||
|
||||
def test_lex_line_counting():
|
||||
""" Make sure we can count lines / columns """
|
||||
def test_lex_column_counting():
|
||||
entry = tokenize("(foo (one two))")[0]
|
||||
|
||||
assert entry.start_line == 1
|
||||
assert entry.start_column == 1
|
||||
|
||||
assert entry.end_line == 1
|
||||
assert entry.end_column == 15
|
||||
|
||||
entry = entry[1]
|
||||
assert entry.start_line == 1
|
||||
assert entry.start_column == 6
|
||||
|
||||
assert entry.end_line == 1
|
||||
assert entry.end_column == 14
|
||||
inner_expr = entry[1]
|
||||
assert inner_expr.start_line == 1
|
||||
assert inner_expr.start_column == 6
|
||||
assert inner_expr.end_line == 1
|
||||
assert inner_expr.end_column == 14
|
||||
|
||||
|
||||
def test_lex_line_counting_multi():
|
||||
|
Loading…
Reference in New Issue
Block a user