Ejemplo n.º 1
0
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])
        )
Ejemplo n.º 2
0
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])
        )
Ejemplo n.º 3
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"]))
Ejemplo n.º 4
0
 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"))
Ejemplo n.º 5
0
 def test_single_line(self):
     self.assert_message_from_report(
         "unexpected line in booth config:\nline",
         reports.booth_config_unexpected_lines(["line"]))