LPTHW-ex49-test for skip and verb parsing


#1

hi ,

i am trying my test skip and verb following way ,not sure if thats the correct one

def test_skip():
word_list = []
assert None == parser.skip(word_list, ‘stop’)
word_list = lexicon.scan(“Bear eat cabinet”)
print("WORD_LIST is ", word_list)
print("PEEK is ", parser.peek(word_list))
print(“MATCH is”, parser.match(word_list, ‘noun’))
print("SKIP is ", parser.skip(word_list, ‘noun’))
#assert (‘noun’, ‘Bear’) == parser.skip(word_list, ‘noun’)

def test_parse_verb():
word_list = lexicon.scan(“bear kill in cabinet”)
print(word_list)
#print(“PARSE VERB is”, parser.parse_verb(word_list))
assert ParserError(“Expected a verb next”) == parser.parse_verb(word_list)