def test_extract_tags_links() -> None: assert extract_tags_links("notag") == ("notag", frozenset(), frozenset()) extracted1: Tuple[str, FrozenSet[str], FrozenSet[str]] = ( "Some text", frozenset(["tag"]), frozenset(), ) assert extract_tags_links("Some text #tag") == extracted1 assert extract_tags_links("Some text ^link") == ( "Some text", frozenset(), frozenset(["link"]), ) extracted2 = ("Some text", frozenset(["tag", "tag2"]), frozenset(["link"])) assert extract_tags_links("Some text #tag #tag2 ^link") == extracted2 assert extract_tags_links("Some text#tag#tag2 ^link") == ( "Some text#tag#tag2", frozenset(), frozenset(["link"]), ) assert extract_tags_links("Some text#tag#tag2^link") == ( "Some text#tag#tag2^link", frozenset(), frozenset(), ) assert extract_tags_links("#tag") == ("", frozenset(["tag"]), frozenset())
def test_extract_tags_links(): assert extract_tags_links('notag') == ('notag', frozenset(), frozenset()) extracted1 = ('Some text', frozenset(['tag']), frozenset()) assert extract_tags_links('Some text #tag') == extracted1 assert extract_tags_links('Some text ^link') == ('Some text', frozenset(), frozenset(['link'])) extracted2 = ('Some text', frozenset(['tag', 'tag2']), frozenset(['link'])) assert extract_tags_links('Some text #tag #tag2 ^link') == extracted2 assert extract_tags_links('Some text#tag#tag2 ^link') == ( 'Some text#tag#tag2', frozenset(), frozenset(['link'])) assert extract_tags_links('Some text#tag#tag2^link') == ( 'Some text#tag#tag2^link', frozenset(), frozenset()) assert extract_tags_links('#tag') == ('', frozenset(['tag']), frozenset())
def test_extract_tags_links(): assert extract_tags_links('notag') == ('notag', frozenset(), frozenset()) extracted1 = ('Some text', frozenset(['tag']), frozenset()) assert extract_tags_links('Some text #tag') == extracted1 assert extract_tags_links('Some text ^link') == ('Some text', frozenset(), frozenset(['link'])) extracted2 = ('Some text', frozenset(['tag', 'tag2']), frozenset(['link'])) assert extract_tags_links('Some text #tag #tag2 ^link') == extracted2 assert extract_tags_links('Some text#tag#tag2 ^link') == ( 'Some text#tag#tag2', frozenset(), frozenset(['link'])) assert extract_tags_links('Some text#tag#tag2^link') == ( 'Some text#tag#tag2^link', frozenset(), frozenset()) assert extract_tags_links('#tag') == ('', frozenset(['tag']), frozenset())
def test_extract_tags_links(): assert extract_tags_links("notag") == ("notag", frozenset(), frozenset()) extracted1 = ("Some text", frozenset(["tag"]), frozenset()) assert extract_tags_links("Some text #tag") == extracted1 assert extract_tags_links("Some text ^link") == ( "Some text", frozenset(), frozenset(["link"]), ) extracted2 = ("Some text", frozenset(["tag", "tag2"]), frozenset(["link"])) assert extract_tags_links("Some text #tag #tag2 ^link") == extracted2 assert extract_tags_links("Some text#tag#tag2 ^link") == ( "Some text#tag#tag2", frozenset(), frozenset(["link"]), ) assert extract_tags_links("Some text#tag#tag2^link") == ( "Some text#tag#tag2^link", frozenset(), frozenset(), ) assert extract_tags_links("#tag") == ("", frozenset(["tag"]), frozenset())