#
import pytest

from ArWikiCats import resolve_label_ar
from utils.dump_runner import make_dump_test_name_data

data0 = {}

data_1 = {
    "1690s missing person cases": "قضايا أشخاص مفقودين في عقد 1690",
    "1620s missing person cases": "قضايا أشخاص مفقودين في عقد 1620",
    "1580s missing person cases": "قضايا أشخاص مفقودين في عقد 1580",
    "1540s missing person cases": "قضايا أشخاص مفقودين في عقد 1540",
    "1550s missing person cases": "قضايا أشخاص مفقودين في عقد 1550",
    "1510s missing person cases": "قضايا أشخاص مفقودين في عقد 1510",
    "1520s missing person cases": "قضايا أشخاص مفقودين في عقد 1520",
    "1500s missing person cases": "قضايا أشخاص مفقودين في عقد 1500",
    "1590s missing person cases": "قضايا أشخاص مفقودين في عقد 1590",
    "1610s missing person cases": "قضايا أشخاص مفقودين في عقد 1610",
    "1630s missing person cases": "قضايا أشخاص مفقودين في عقد 1630",
    "1670s missing person cases": "قضايا أشخاص مفقودين في عقد 1670",
    "1570s missing person cases": "قضايا أشخاص مفقودين في عقد 1570",
    "1680s missing person cases": "قضايا أشخاص مفقودين في عقد 1680",
    "1460s missing person cases": "قضايا أشخاص مفقودين في عقد 1460",
    "1410s missing person cases": "قضايا أشخاص مفقودين في عقد 1410",
    "Film people from Northern Ireland": "أعلام أفلام من أيرلندا الشمالية",
    "20th-century architects from Northern Ireland": "معماريون من أيرلندا الشمالية في القرن 20",
    "20th-century engineers from Northern Ireland": "مهندسون من أيرلندا الشمالية في القرن 20",
    "20th-century musicians by instrument from Northern Ireland": "موسيقيون في القرن 20 حسب الآلة من أيرلندا الشمالية",
    "21st-century engineers from Northern Ireland": "مهندسون من أيرلندا الشمالية في القرن 21",
    "21st-century male artists from Northern Ireland": "فنانون ذكور من أيرلندا الشمالية في القرن 21",
    "21st-century medical doctors from Northern Ireland": "أطباء من أيرلندا الشمالية في القرن 21",
    "21st-century musicians by instrument from Northern Ireland": "موسيقيون في القرن 21 حسب الآلة من أيرلندا الشمالية",
    "21st-century painters from Northern Ireland": "رسامون من أيرلندا الشمالية في القرن 21",
    "21st-century women educators from Northern Ireland": "معلمات من أيرلندا الشمالية في القرن 21",
    "21st-century women medical doctors from Northern Ireland": "طبيبات من أيرلندا الشمالية في القرن 21",
    "Accountants from Northern Ireland": "محاسبون من أيرلندا الشمالية",
    "Anarchists from Northern Ireland": "لاسلطويون من أيرلندا الشمالية",
    "Archers from Northern Ireland": "نبالون من أيرلندا الشمالية",
    "Art historians from Northern Ireland": "مؤرخو الفن من أيرلندا الشمالية",
    "Audio engineers from Northern Ireland": "مهندسو صوت من أيرلندا الشمالية",
    "Badminton players from Northern Ireland": "لاعبو تنس ريشة من أيرلندا الشمالية",
    "Basketball players from Northern Ireland": "لاعبو كرة سلة من أيرلندا الشمالية",
    "Bassoonists from Northern Ireland": "عازفو باسون من أيرلندا الشمالية",
    "Canoeists from Northern Ireland": "متسابقو قوارب الكانوي من أيرلندا الشمالية",
    "Cardiologists from Northern Ireland": "أطباء قلب من أيرلندا الشمالية",
    "Choreographers from Northern Ireland": "مصممو رقص من أيرلندا الشمالية",
    "Classical scholars from Northern Ireland": "باحثون كلاسيكيون من أيرلندا الشمالية",
    "Comedy writers from Northern Ireland": "كتاب كوميديا من أيرلندا الشمالية",
    "Documentary filmmakers from Northern Ireland": "صانعو أفلام وثائقية من أيرلندا الشمالية",
    "Editorial cartoonists from Northern Ireland": "محررون كارتونيون من أيرلندا الشمالية",
    "Editors from Northern Ireland": "محررون من أيرلندا الشمالية",
    "Electronic music groups from Northern Ireland": "فرق موسيقى إلكترونية من أيرلندا الشمالية",
    "Epidemiologists from Northern Ireland": "علماء وبائيات من أيرلندا الشمالية",
    "Female archers from Northern Ireland": "نبالات من أيرلندا الشمالية",
    "Female badminton players from Northern Ireland": "لاعبات تنس ريشة من أيرلندا الشمالية",
    "Female equestrians from Northern Ireland": "فارسات خيول من أيرلندا الشمالية",
    "Female golfers from Northern Ireland": "لاعبات غولف من أيرلندا الشمالية",
    "Female judoka from Northern Ireland": "لاعبات جودو من أيرلندا الشمالية",
    "Female martial artists from Northern Ireland": "ممارسات فنون قتالية من أيرلندا الشمالية",
    "Female sport shooters from Northern Ireland": "لاعبات رماية من أيرلندا الشمالية",
    "Female swimmers from Northern Ireland": "سباحات من أيرلندا الشمالية",
    "Feminists from Northern Ireland": "نسويون من أيرلندا الشمالية",
    "Fiddlers from Northern Ireland": "عازفو كمان من أيرلندا الشمالية",
    "Film critics from Northern Ireland": "نقاد أفلام من أيرلندا الشمالية",
    "Film editors from Northern Ireland": "محررو أفلام من أيرلندا الشمالية",
    "Films scored by composers from Northern Ireland": "أفلام سجلها ملحنون من أيرلندا الشمالية",
    "Folk music groups from Northern Ireland": "فرق موسيقى تقليدية من أيرلندا الشمالية",
    "Gaelic footballers from Northern Ireland by county": "لاعبو كرة قدم غيلية من أيرلندا الشمالية حسب المقاطعة",
    "Gaelic footballers from Northern Ireland": "لاعبو كرة قدم غيلية من أيرلندا الشمالية",
    "Gamblers from Northern Ireland": "مقامرون من أيرلندا الشمالية",
    "Geologists from Northern Ireland": "جيولوجيون من أيرلندا الشمالية",
    "Horticulturists from Northern Ireland": "بستانيون من أيرلندا الشمالية",
    "Humorists from Northern Ireland": "فكاهيون من أيرلندا الشمالية",
    "Installation artists from Northern Ireland": "فنانون تنصيبيون من أيرلندا الشمالية",
    "Jazz musicians from Northern Ireland": "موسيقيو جاز من أيرلندا الشمالية",
    "Legal scholars from Northern Ireland": "أساتذة قانون من أيرلندا الشمالية",
    "Lists of politicians from Northern Ireland": "قوائم سياسيون من أيرلندا الشمالية",
    "Local politicians in Northern Ireland": "سياسيون محليون في أيرلندا الشمالية",
    "Lyricists from Northern Ireland": "شعراء غنائيون من أيرلندا الشمالية",
    "Male chefs from Northern Ireland": "طباخون ذكور من أيرلندا الشمالية",
    "Male fiddlers from Northern Ireland": "عازفو كمان ذكور من أيرلندا الشمالية",
    "Male sailors (sport) from Northern Ireland": "بحارة رياضيون ذكور من أيرلندا الشمالية",
    "Male sport shooters from Northern Ireland": "لاعبو رماية ذكور من أيرلندا الشمالية",
    "Marxists from Northern Ireland": "ماركسيون من أيرلندا الشمالية",
    "Meteorologists from Northern Ireland": "خبراء أرصاد جوية من أيرلندا الشمالية",
    "Music critics from Northern Ireland": "نقاد موسيقى من أيرلندا الشمالية",
    "Music journalists from Northern Ireland": "صحفيون موسيقيون من أيرلندا الشمالية",
    "Music video directors from Northern Ireland": "مخرجو فيديوهات موسيقية من أيرلندا الشمالية",
    "Musicologists from Northern Ireland": "علماء موسيقى من أيرلندا الشمالية",
    "Nature writers from Northern Ireland": "كتاب طبيعة من أيرلندا الشمالية",
    "Netball players from Northern Ireland": "لاعبو كرة شبكة من أيرلندا الشمالية",
    "Neurologists from Northern Ireland": "أطباء أعصاب من أيرلندا الشمالية",
    "Neuroscientists from Northern Ireland": "علماء أعصاب من أيرلندا الشمالية",
    "Newspaper editors from Northern Ireland": "محررو صحف من أيرلندا الشمالية",
    "Newspaper people by newspaper in Northern Ireland": "شخصيات صحف حسب الصحيفة في أيرلندا الشمالية",
    "Newspaper people from Northern Ireland": "شخصيات صحف من أيرلندا الشمالية",
    "Nurses from Northern Ireland": "ممرضون من أيرلندا الشمالية",
    "Organists from Northern Ireland": "عازفو أورغن من أيرلندا الشمالية",
    "Ornithologists from Northern Ireland": "علماء طيور من أيرلندا الشمالية",
    "Poker players from Northern Ireland": "لاعبو بوكر من أيرلندا الشمالية",
    "Political scientists from Northern Ireland": "علماء سياسة من أيرلندا الشمالية",
    "Political writers from Northern Ireland": "كتاب سياسة من أيرلندا الشمالية",
    "Pop music groups from Northern Ireland": "فرق موسيقى بوب من أيرلندا الشمالية",
    "Radio actresses from Northern Ireland": "ممثلات راديو من أيرلندا الشمالية",
    "Radio producers from Northern Ireland": "منتجو راديو من أيرلندا الشمالية",
    "Radiologists from Northern Ireland": "أخصائيو أشعة من أيرلندا الشمالية",
    "Sailors (sport) from Northern Ireland": "بحارة رياضيون من أيرلندا الشمالية",
    "Satirists from Northern Ireland": "كتاب هجائيون من أيرلندا الشمالية",
    "Silent film actors from Northern Ireland": "ممثلو أفلام صامتة من أيرلندا الشمالية",
    "Sport shooters from Northern Ireland": "لاعبو رماية من أيرلندا الشمالية",
    "Sports broadcasters from Northern Ireland": "مذيعون رياضيون من أيرلندا الشمالية",
    "Sportspeople from Northern Ireland in doping cases": "رياضيون من أيرلندا الشمالية في قضايا منشطات",
    "Statisticians from Northern Ireland": "إحصائيون من أيرلندا الشمالية",
    "Surrealist artists from Northern Ireland": "فنانون سرياليون من أيرلندا الشمالية",
    "Table tennis players from Northern Ireland": "لاعبو كرة طاولة من أيرلندا الشمالية",
    "Television chefs from Northern Ireland": "طباخو تلفاز من أيرلندا الشمالية",
    "Television talk show hosts from Northern Ireland": "مقدمو برامج تلفزيونية حوارية من أيرلندا الشمالية",
    "Video artists from Northern Ireland": "فنانو فيديو من أيرلندا الشمالية",
    "Watercolourists from Northern Ireland": "رسامون مائيون من أيرلندا الشمالية",
    "Women academics from Northern Ireland": "أكاديميات من أيرلندا الشمالية",
    "Women boxers from Northern Ireland": "ملاكمات من أيرلندا الشمالية",
    "Women chefs from Northern Ireland": "طباخات من أيرلندا الشمالية",
    "Women choreographers from Northern Ireland": "مصممات رقص من أيرلندا الشمالية",
    "Women civil servants from Northern Ireland": "موظفات خدمة مدنية من أيرلندا الشمالية",
    "Women comedians from Northern Ireland": "كوميديات من أيرلندا الشمالية",
    "Women judges from Northern Ireland": "قاضيات من أيرلندا الشمالية",
    "Women mathematicians from Northern Ireland": "عالمات رياضيات من أيرلندا الشمالية",
    "Women mayors of places in Northern Ireland": "رئيسات بلديات في أيرلندا الشمالية",
    "Women members of the Parliament of Northern Ireland": "عضوات برلمان أيرلندا الشمالية",
    "Women photographers from Northern Ireland": "مصورات من أيرلندا الشمالية",
    "Women television personalities from Northern Ireland": "شخصيات تلفزيون من أيرلندا الشمالية",
    "Women travel writers from Northern Ireland": "كاتبات سفر من أيرلندا الشمالية",
}

data_2 = {
    "20th-century MEPs for Northern Ireland": "",
    "20th-century Presbyterian ministers from Northern Ireland": "",
    "21st-century MEPs for Northern Ireland": "",
    "21st-century Presbyterian ministers from Northern Ireland": "",
    "21st-century women MEPs for Northern Ireland": "",
    "Advocates general for Northern Ireland": "",
    "All-female bands from Northern Ireland": "",
    "Alliance Party of Northern Ireland politicians": "",
    "Anaesthetists from Northern Ireland": "",
    "Antiquarians from Northern Ireland": "",
    "Artistic directors from Northern Ireland": "",
    "Banjoists from Northern Ireland": "",
    "Barristers from Northern Ireland": "",
    "Blues musical groups from Northern Ireland": "",
    "Bouzouki players from Northern Ireland": "",
    "Boxing promoters from Northern Ireland": "",
    "Ceremonial officers in Northern Ireland": "",
    "Chief Medical Officers for Northern Ireland": "",
    "Children's entertainers from Northern Ireland": "",
    "Children's television presenters from Northern Ireland": "",
    "Civil servants in the Northern Ireland Office": "",
    "Cookbook writers from Northern Ireland": "",
    "Councillors in Northern Ireland": "",
    "Deputy lieutenants in Northern Ireland": "",
    "Drag queens from Northern Ireland": "",
    "Experimental musical groups from Northern Ireland": "",
    "Far-right politicians from Northern Ireland": "",
    "Film score composers from Northern Ireland": "",
    "Folk-song collectors from Northern Ireland": "",
    "Game show hosts from Northern Ireland": "",
    "Gay actors from Northern Ireland": "",
    "Gay men from Northern Ireland by occupation": "",
    "Gay musicians from Northern Ireland": "",
    "Gay writers from Northern Ireland": "",
    "General practitioners from Northern Ireland": "",
    "Green Party Northern Ireland politicians": "",
    "Hammered dulcimer players from Northern Ireland": "",
    "Harpists from Northern Ireland": "",
    "Heads of the Northern Ireland Civil Service": "",
    "Health professionals from Northern Ireland by county": "",
    "Health professionals from Northern Ireland": "",
    "High Court judges of Northern Ireland": "",
    "High shrievalties in Northern Ireland": "",
    "Hurlers from Northern Ireland by county": "",
    "Hurlers from Northern Ireland": "",
    "Hymnwriters from Northern Ireland": "",
    "Independent politicians in Northern Ireland": "",
    "Ladies' Gaelic footballers from Northern Ireland": "",
    "Leaders of the Alliance Party of Northern Ireland": "",
    "LGBTQ comedians from Northern Ireland": "",
    "LGBTQ dramatists and playwrights from Northern Ireland": "",
    "LGBTQ models from Northern Ireland": "",
    "Local government officers in Northern Ireland": "",
    "Lord chief justices of Northern Ireland": "",
    "Lord-lieutenants in Northern Ireland": "",
    "Lords Justice of Appeal of Northern Ireland": "",
    "Male harpists from Northern Ireland": "",
    "Male uilleann pipers from Northern Ireland": "",
    "Marxist writers from Northern Ireland": "",
    "Mass media people from Northern Ireland by county": "",
    "Media personalities from Northern Ireland": "",
    "Members of the Northern Ireland Civil Service": "",
    "Members of the Northern Ireland Constitutional Convention": "",
    "Members of the Northern Ireland Forum": "",
    "Members of the Privy Council of Northern Ireland": "",
    "Methodist ministers from Northern Ireland": "",
    "Musical duos from Northern Ireland": "",
    "Musical quartets from Northern Ireland": "",
    "Musical quintets from Northern Ireland": "",
    "Musical theatre composers from Northern Ireland": "",
    "Musical trios from Northern Ireland": "",
    "National Democratic Party (Northern Ireland) politicians": "",
    "Noise musical groups from Northern Ireland": "",
    "Northern Ireland Government ministers": "",
    "Northern Ireland justices of the peace": "",
    "Northern Ireland King's Counsel": "",
    "Northern Ireland Labour Party politicians": "",
    "Northern Ireland MLAs 1998–2003": "",
    "Northern Ireland prison officers": "",
    "Northern Ireland Unionist Party politicians": "",
    "Northern Ireland Women's Coalition politicians": "",
    "Oboists from Northern Ireland": "",
    "Ombudsmen in Northern Ireland": "",
    "Orchestras from Northern Ireland": "",
    "Palaeontologists from Northern Ireland": "",
    "Permanent under-secretaries of state for Northern Ireland": "",
    "Players of English billiards from Northern Ireland": "",
    "Pool players from Northern Ireland": "",
    "Presbyterian ministers from Northern Ireland": "",
    "Psychologists from Northern Ireland": "",
    "Punk rock musicians from Northern Ireland": "",
    "Radio DJs from Northern Ireland": "",
    "Roboticists from Northern Ireland": "",
    "Shakespearean actors from Northern Ireland": "",
    "Songs by songwriters from Northern Ireland": "",
    "Strength athletes from Northern Ireland": "",
    "TikTokers from Northern Ireland": "",
    "Tin whistle players from Northern Ireland": "",
    "Uilleann pipers from Northern Ireland": "",
    "Wikipedia categories named after actors from Northern Ireland": "",
    "Wikipedia categories named after musical groups from Northern Ireland": "",
    "Wikipedia categories named after musicians from Northern Ireland": "",
    "Women councillors in Northern Ireland": "",
    "Women harpists from Northern Ireland": "",
    "Women MEPs for Northern Ireland": "",
    "Women political office-holders in Northern Ireland": "",
}

to_test = [
    ("test_northern_ireland_1", data_1),
    # ("test_northern_ireland_2", data_2),
]


@pytest.mark.parametrize("category, expected", data_1.items(), ids=data_1.keys())
@pytest.mark.fast
def test_northern_ireland_1(category: str, expected: str) -> None:
    label = resolve_label_ar(category)
    assert label == expected


test_dump_all = make_dump_test_name_data(to_test, resolve_label_ar, run_same=False)
