Commit ad3b2558 authored by di68kap's avatar di68kap
Browse files

bugfix keyerror if no match-tests have been specified

parent 6ce9975d
......@@ -272,7 +272,7 @@ def grammar_unit(test_unit, parser_factory, transformer_factory, report=True, ve
assert set(tests.keys()).issubset(UNIT_STAGES)
if verbose:
print(' Match-Tests for parser "' + parser_name + '"')
match_tests = set(tests['match'].keys())
match_tests = set(tests['match'].keys()) if 'match' in tests else set()
if 'ast' in tests:
ast_tests = set(tests['ast'].keys())
if not ast_tests <= match_tests:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment