Пример #1
0
def test_catsup_meta_parser():
    meta_txt = """
    # Hello, world!

    - tags: hello, world
    """
    lines = [l.strip() for l in meta_txt.splitlines() if l]
    meta = parse_catsup_meta(lines)
    assert meta.title == "Hello, world!"
    assert meta.tags == "hello, world"
Пример #2
0
def test_catsup_meta_parser_error_2():
    parse_catsup_meta(["#fsdaf-,-,-,-", "fdsa- 0,"])