e41094f908
Fixed #12 Fixed #13 Fixed #14
15 lines
428 B
Python
15 lines
428 B
Python
from parsers.ParserInput import ParserInput
|
|
from parsers.tokenizer import LexerError
|
|
|
|
|
|
def test_i_can_parser_input():
|
|
parser_input = ParserInput("def concept a")
|
|
assert parser_input.init() is True
|
|
assert parser_input.exception is None
|
|
|
|
|
|
def test_i_can_detect_errors():
|
|
parser_input = ParserInput('def concept "a')
|
|
assert parser_input.init() is False
|
|
assert isinstance(parser_input.exception, LexerError)
|