def test_parser_should_raise_an_error_if_equal_not_found(): content = """[foo] a {c = 1, d = 2} """ parser = Parser(content) with pytest.raises(UnexpectedCharError): parser.parse()
def test_parser_should_raise_an_error_for_empty_tables(): content = """ [one] [] """ parser = Parser(content) with pytest.raises(EmptyTableNameError) as e: parser.parse() assert e.value.line == 3 assert e.value.col == 1