def parse(content): try: return organize_lines(parse_to_raw_lines(content)) except InvalidLines as e: raise LibraryError( reports.booth_config_unexpected_lines(e.args[0]) )
def test_multiple_lines(self): self.assert_message_from_report( "unexpected lines in booth config:\nline\nline2", reports.booth_config_unexpected_lines(["line", "line2"]))
def test_file_path(self): self.assert_message_from_report( "unexpected line in booth config 'PATH':\nline", reports.booth_config_unexpected_lines(["line"], file_path="PATH"))
def test_single_line(self): self.assert_message_from_report( "unexpected line in booth config:\nline", reports.booth_config_unexpected_lines(["line"]))