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")
|
with lexe(): tokenize(":hello.foo")
|
||||||
|
|
||||||
|
|
||||||
def test_lex_line_counting():
|
def test_lex_column_counting():
|
||||||
""" Make sure we can count lines / columns """
|
|
||||||
entry = tokenize("(foo (one two))")[0]
|
entry = tokenize("(foo (one two))")[0]
|
||||||
|
|
||||||
assert entry.start_line == 1
|
assert entry.start_line == 1
|
||||||
assert entry.start_column == 1
|
assert entry.start_column == 1
|
||||||
|
|
||||||
assert entry.end_line == 1
|
assert entry.end_line == 1
|
||||||
assert entry.end_column == 15
|
assert entry.end_column == 15
|
||||||
|
|
||||||
entry = entry[1]
|
inner_expr = entry[1]
|
||||||
assert entry.start_line == 1
|
assert inner_expr.start_line == 1
|
||||||
assert entry.start_column == 6
|
assert inner_expr.start_column == 6
|
||||||
|
assert inner_expr.end_line == 1
|
||||||
assert entry.end_line == 1
|
assert inner_expr.end_column == 14
|
||||||
assert entry.end_column == 14
|
|
||||||
|
|
||||||
|
|
||||||
def test_lex_line_counting_multi():
|
def test_lex_line_counting_multi():
|
||||||
|
Loading…
Reference in New Issue
Block a user