@@ -0,0 +1,14 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user