def test_all_extended_patterns(): given = ('This is an **example** [Markdown](https://commonmark.org/)\n' 'comment. Here are some requests:\n' '{{anime 1}} {{anime2}}\n' '<<manga 1>> <<manga2>>\n' ']]light novel 1[[ ]]light_novel2[[\n' '||visual novel 1|| ||visual_novel2||\n') expected = [ 'anime 1', 'anime2', 'manga 1', 'manga2', 'light novel 1', 'light_novel2', 'visual novel 1', 'visual_novel2', ] actual = list(find_requests('all', given, expanded=True)) assert actual == expected
def test_all_regular_patterns(): given = ('This is an **example** [Markdown](https://commonmark.org/)\n' 'comment. Here are some requests:\n' '{anime 1} {anime2}\n' '<manga 1> <manga2>\n' ']light novel 1[ ]light_novel2[\n' '|visual novel 1| |visual_novel2|\n') expected = [ 'anime 1', 'anime2', 'manga 1', 'manga2', 'light novel 1', 'light_novel2', 'visual novel 1', 'visual_novel2', ] actual = list(find_requests('all', given)) assert actual == expected
def test_expanded_anime(given, expected): actual = list(find_requests('anime', given, expanded=True)) assert actual == expected
def test_regular_anime(given, expected): actual = list(find_requests('anime', given)) assert actual == expected
def test_expanded_visual_novel(given, expected): actual = list(find_requests('visual_novel', given, expanded=True)) assert actual == expected
def test_regular_visual_novel(given, expected): actual = list(find_requests('visual_novel', given)) assert actual == expected
def test_expanded_manga(given, expected): actual = list(find_requests('manga', given, expanded=True)) assert actual == expected
def test_regular_manga(given, expected): actual = list(find_requests('manga', given)) assert actual == expected