# Path: patacrep/authors.py
# LOGGER = logging.getLogger(__name__)
# RE_AFTER = r"^.*\b{}\b(.*)$"
# RE_SEPARATOR = r"^(.*)\b *{} *(\b.*)?$"
# def compile_authwords(authwords):
# def split_author_names(string):
# def split_sep_author(string, separators):
# def processauthors_removeparen(authors_string):
# def processauthors_split_string(authors_string, separators):
# def processauthors_remove_after(authors_list, after):
# def processauthors_ignore_authors(authors_list, ignore):
# def processauthors_clean_authors(authors_list):
# def processauthors(authors_string, after=None, ignore=None, separators=None):
# def process_listauthors(authors_list, after=None, ignore=None, separators=None):


import unittest
from patacrep import authors
            ("Parry", "Hubert"),
            ("Royal~Choir~of~FooBar", "The"),
        ]
    ),
    (
        "Anonyme (1967)",
        [],
    ),
    (
        "Lucky Luke et Jolly Jumper",
        [
            ("Luke", "Lucky"),
            ("Jumper", "Jolly"),
        ],
    ),
]

AUTHWORDS = authors.compile_authwords({
    "after": ["by"],
    "ignore": ["anonymous", "Anonyme", "anonyme"],
    "separators": ['and', 'et'],
    })

class TestAutors(unittest.TestCase):
    """Test of author parsing."""

    def test_split_author_names(self):
        """Test of :func:`patacrep.authors.split_author_names` function."""
        for argument, expected in SPLIT_AUTHORS_DATA:
            with self.subTest(argument=argument, expected=expected):

# Path: patacrep/authors.py
# LOGGER = logging.getLogger(__name__)
# RE_AFTER = r"^.*\b{}\b(.*)$"
# RE_SEPARATOR = r"^(.*)\b *{} *(\b.*)?$"
# def compile_authwords(authwords):
# def split_author_names(string):
# def split_sep_author(string, separators):
# def processauthors_removeparen(authors_string):
# def processauthors_split_string(authors_string, separators):
# def processauthors_remove_after(authors_list, after):
# def processauthors_ignore_authors(authors_list, ignore):
# def processauthors_clean_authors(authors_list):
# def processauthors(authors_string, after=None, ignore=None, separators=None):
# def process_listauthors(authors_list, after=None, ignore=None, separators=None):


# Path: test/test_authors.py
import unittest
from patacrep import authors

            ("Parry", "Hubert"),
            ("Royal~Choir~of~FooBar", "The"),
        ]
    ),
    (
        "Anonyme (1967)",
        [],
    ),
    (
        "Lucky Luke et Jolly Jumper",
        [
            ("Luke", "Lucky"),
            ("Jumper", "Jolly"),
        ],
    ),
]

AUTHWORDS = authors.compile_authwords({
    "after": ["by"],
    "ignore": ["anonymous", "Anonyme", "anonyme"],
    "separators": ['and', 'et'],
    })

class TestAutors(unittest.TestCase):
    """Test of author parsing."""

    def test_split_author_names(self):
        """Test of :func:`patacrep.authors.split_author_names` function."""
        for argument, expected in SPLIT_AUTHORS_DATA:
            with self.subTest(argument=argument, expected=expected):

                self.assertEqual(authors.split_author_names(argument), expected)