"""
Tests
"""

import pytest

from ArWikiCats.legacy_bots.ma_bots2.lab import get_type_lab

data = [
    (" of ", "forests and woodlands of", "غابات"),
    (" of ", "ports and harbours of", "مرافئ وموانئ"),
    (" of ", " university of", "جامعة"),
    ("in", "arizona territory", "إقليم أريزونا"),
    (" by ", "basketball playerss in lebanon", "لاعبو كرة سلة في لبنان"),
    (" in ", "former buildings and structures", "مبان ومنشآت سابقة"),
    (" opened in ", "railway stations in south korea", "محطات السكك الحديدية في كوريا الجنوبية"),
    (" in ", "tunisian expatriate basketball people", "أعلام كرة سلة تونسيون مغتربون"),
    (" by ", "history of central african republic", "تاريخ جمهورية إفريقيا الوسطى"),
    (" involving ", "battles of napoleonic wars", "معارك الحروب النابليونية"),
    (" by ", "burials in washington (state)", "مدفونون في ولاية واشنطن"),
    (" by ", "taiwanese football club seasons", "مواسم أندية كرة قدم تايوانية"),
    (" closed in ", "railway stations in france", "محطات السكك الحديدية في فرنسا"),
    (" by ", "male actors from the west midlands (county)", "ممثلون ذكور من مقاطعة ميدلاند الغربية"),
    (" in ", "demolished buildings and structures", "مبان ومنشآت مهدمة"),
    (" by ", "weapons of mass destruction", "أسلحة دمار شامل"),
    (" in ", "lithuanian expatriate basketball people", "أعلام كرة سلة ليتوانيون مغتربون"),
    (" in ", "years of 21st century", "سنوات القرن 21"),
    (" in ", "by university or college", "حسب الجامعة أو الكلية"),
    (" in ", "buildings and structures under construction", "مبان ومنشآت تحت بناء"),
    (" in ", "lists of buildings and structures", "قوائم مبان ومنشآت"),
    (" in ", "years of 18th century", "سنوات القرن 18"),
    (" in ", "senegalese expatriate basketball people", "أعلام كرة سلة سنغاليون مغتربون"),
    (" in ", "sports clubs and teams", "أندية وفرق رياضية"),
    (" by ", "road incident deaths in the united states", "وفيات حوادث الطرق في الولايات المتحدة"),
    (" in ", "russian expatriate volleyball players", "لاعبو كرة طائرة روس مغتربون"),
    (" in ", "years of 17th century", "سنوات القرن 17"),
    (" in ", "port cities and towns", "مدن وبلدات ساحلية"),
    (" in ", "golf clubs and courses", "نوادي الغولف والدورات"),
    (" in ", "south korean expatriate sports-people", "رياضيون كوريون جنوبيون مغتربون"),
    (" by ", "ethnic groups in china", "مجموعات عرقية في الصين"),
    (" to ", "permanent representatives of jamaica", "مندوبو جامايكا الدائمون"),
    (" opened in ", "railway stations in japan", "محطات السكك الحديدية في اليابان"),
    (" disestablished in ", "art museums and galleries", "متاحف فنية ومعارض"),
    (" by ", "1789 in the united kingdom", "المملكة المتحدة في 1789"),
    (" opened in ", "railway stations in sweden", "محطات السكك الحديدية في السويد"),
    (" established in ", "sports clubs and teams", "أندية وفرق رياضية"),
    (" by ", "establishments in southeast asia", "تأسيسات في جنوب شرق آسيا"),
    (" opened in ", "railway stations in germany", "محطات السكك الحديدية في ألمانيا"),
    (" in ", "victims of aviation accidents or incidents", "ضحايا حوادث طيران"),
    (" in ", "years of 20th century", "سنوات القرن 20"),
    (" by ", "skyscrapers in the united arab emirates", "ناطحات سحاب في الإمارات العربية المتحدة"),
    (" to ", "ambassadors of south africa", "سفراء جنوب إفريقيا"),
    (" by ", "welsh rugby union players", "لاعبو اتحاد رجبي ويلزيون"),
    (" closed in ", "railway stations in northern-ireland", "محطات السكك الحديدية في أيرلندا الشمالية"),
    (" by ", "sports venues in australia", "ملاعب رياضية في أستراليا"),
    (" closed in ", "railway stations in albania", "محطات السكك الحديدية في ألبانيا"),
    (" in ", "swiss expatriate basketball people", "أعلام كرة سلة سويسريون مغتربون"),
    (" in ", "roman catholic church buildings", "مبان كنائس رومانية كاثوليكية"),
    (" by ", "christianity in the united states", "المسيحية في الولايات المتحدة"),
    (" in ", "transportation buildings and structures", "مبان ومنشآت نقل"),
    (" by ", "transportation buildings and structures in new hampshire", "مبان ومنشآت نقل في نيوهامشير"),
    (" by ", "1789 in men's football", "كرة القدم للرجال في 1789"),
    (" by ", "buildings and structures in idaho", "مبان ومنشآت في أيداهو"),
    (" in ", "olympic silver medalists for the united states", "فائزون بميداليات فضية أولمبية من الولايات المتحدة"),
    (" by ", "netball in north america", "كرة الشبكة في أمريكا الشمالية"),
    (" in ", "religious buildings and structures", "مبان ومنشآت دينية"),
    (" in ", "years of 19th century", "سنوات القرن 19"),
    (" closed in ", "railway stations in germany", "محطات السكك الحديدية في ألمانيا"),
    (" established in ", "military units and formations", "وحدات وتشكيلات عسكرية"),
    (" by ", "history of austria hungary", "تاريخ الإمبراطورية النمساوية المجرية"),
    (" in ", "transport buildings and structures", "مبان ومنشآت نقل"),
    (" in ", "lists of mayors of places", "قوائم رؤساء بلديات"),
    (" in ", "church of jesus christ of latter-day saints", "كنيسة يسوع المسيح لقديسي الأيام الأخيرة"),
    (" by ", "rivers of united states", "أنهار الولايات المتحدة"),
    (" by ", "history of nova scotia", "تاريخ نوفا سكوشا"),
    (" by ", "1789 establishments in india", "تأسيسات سنة 1789 في الهند"),
    (" by ", "lists of bosnia and herzegovina people", "قوائم بوسنيون"),
    (
        " from ",
        "know-nothing members of united states house-of-representatives",
        "أعضاء حزب لا أدري في مجلس النواب الأمريكي",
    ),
    (" from ", "united states house-of-representatives", "مجلس النواب الأمريكي"),
    (" by ", "trade unions in the caribbean", "نقابات عمالية في الكاريبي"),
    (" by ", "1789 in women's sport", "رياضة نسائية في 1789"),
    (" hosted by ", "international field hockey competitions", "منافسات هوكي ميدان دولية"),
    (" opened in ", "railway stations in the united states", "محطات السكك الحديدية في الولايات المتحدة"),
    (" by ", "1789 crimes in africa", "جرائم 1789 في إفريقيا"),
    (" by ", "buildings and structures in prince edward island", "مبان ومنشآت في جزيرة الأمير إدوارد"),
    (" opened in ", "railway stations in latvia", "محطات السكك الحديدية في لاتفيا"),
    (" concerning ", "united nations security council resolutions", "قرارات مجلس الأمن التابع للأمم المتحدة"),
    (" opened in ", "railway stations in indonesia", "محطات السكك الحديدية في إندونيسيا"),
    (" closed in ", "railway stations in republic-of ireland", "محطات السكك الحديدية في جمهورية أيرلندا"),
    (" to ", "ambassadors of federated states-of micronesia", "سفراء ولايات ميكرونيسيا المتحدة"),
    (" in ", "south african expatriate sports-people", "رياضيون جنوب إفريقيون مغتربون"),
    (" for ", "central american and caribbean games medalists", "فائزون بميداليات ألعاب أمريكا الوسطى والكاريبي"),
    (" in ", "years of 16th century", "سنوات القرن 16"),
    (" by ", "1789 in south american football", "كرة القدم الأمريكية الجنوبية في 1789"),
    (" in ", "united states house-of-representatives elections", "انتخابات مجلس النواب الأمريكي"),
    (" in ", "art museums and galleries", "متاحف فنية ومعارض"),
    (" opened in ", "railway stations in serbia", "محطات السكك الحديدية في صربيا"),
    (" to ", "ambassadors of united states", "سفراء الولايات المتحدة"),
    (" involving the ", "military operations of syrian civil war", "عمليات عسكرية في الحرب الأهلية السورية"),
    (" by ", "protected areas of georgia (u.s. state)", "مناطق محمية في ولاية جورجيا"),
    (" by ", "universities and colleges in andhra pradesh", "جامعات وكليات في أندرا برديش"),
    (" by ", "1789 in north america", "أمريكا الشمالية في 1789"),
    (" in ", "lists of universities and colleges", "قوائم جامعات وكليات"),
    (" based in ", "medical and health organizations", "منظمات طبية وصحية"),
    (" in ", "military units and formations", "وحدات وتشكيلات عسكرية"),
    (" completed in ", "religious buildings and structures", "مبان ومنشآت دينية"),
    (" by ", "disestablishments in georgia (u.s. state)", "انحلالات في ولاية جورجيا"),
    (" by ", "history of northern ireland", "تاريخ أيرلندا الشمالية"),
    (" in ", "parliament of united kingdom", "برلمان المملكة المتحدة"),
    (" opened in ", "railway stations in northern-ireland", "محطات السكك الحديدية في أيرلندا الشمالية"),
    (" in ", "australian rules football clubs", "أندية كرة قدم أسترالية"),
    (" by ", "1789 elections in the united states", "انتخابات 1789 في الولايات المتحدة"),
    (" by ", "buildings and structures in georgia (u.s. state)", "مبان ومنشآت في ولاية جورجيا"),
    (" by ", "lists of country subdivisions", "قوائم تقسيمات البلد"),
    (" in ", "attacks on buildings and structures", "هجمات على مبان ومنشآت"),
    (" in ", "french expatriate rugby union players", "لاعبو اتحاد رجبي فرنسيون مغتربون"),
    (" opened in ", "railway stations in austria", "محطات السكك الحديدية في النمسا"),
    (" hosted by ", "international ice hockey competitions", "منافسات هوكي جليد دولية"),
    (" opened in ", "railway stations in the netherlands", "محطات السكك الحديدية في هولندا"),
    (" from ", "players of american football", "لاعبو كرة قدم أمريكية"),
    (" in ", "defunct sports clubs and teams", "أندية وفرق رياضية سابقة"),
    (" in ", "installations of united states air force", "منشآت في القوات الجوية الأمريكية"),
    (" in ", "united states air force", "القوات الجوية الأمريكية"),
    (" in ", "christian buildings and structures", "مبان ومنشآت مسيحية"),
    (" from ", "major league baseball players", "لاعبو دوري كرة القاعدة الرئيسي"),
    (" opened in ", "railway stations in great britain", "محطات السكك الحديدية في بريطانيا العظمى"),
    (" by ", "1789 in brazilian sport", "رياضة برازيلية في 1789"),
    (" by ", "history of north america", "تاريخ أمريكا الشمالية"),
    (" by ", "people from west sumatra", "أشخاص من سومطرة الغربية"),
    (" by ", "volleyball competitions in asia", "منافسات كرة طائرة في آسيا"),
    (" by ", "anglican bishops in asia", "أساقفة أنجليكيون في آسيا"),
    (
        " by ",
        "national-register-of-historic-places in north carolina",
        "السجل الوطني للأماكن التاريخية في كارولاينا الشمالية",
    ),
    (" involving ", "battles of vietnam war", "معارك حرب فيتنام"),
    (" by ", "sports-people in västmanland county", "رياضيون في مقاطعة فستمانلاند"),
    (" for ", "olympic field hockey players", "لاعبو هوكي ميدان أولمبيون"),
    (" in ", "expatriates from northern ireland", "مغتربون من أيرلندا الشمالية"),
    (" for ", "olympic table tennis players", "لاعبو كرة طاولة أولمبيون"),
    (" by ", "port cities and towns", "مدن وبلدات ساحلية"),
    (" for ", "african games silver medalists", "فائزون بميداليات فضية في الألعاب الإفريقية"),
    (" by ", "1789 in asian sport", "رياضة آسيوية في 1789"),
    (" by ", "1789 in chinese sport", "رياضة صينية في 1789"),
    (" in ", "track and field athletes", "رياضيو المسار والميدان"),
    (" by ", "1789 in youth football", "كرة القدم للشباب في 1789"),
    (" by ", "transport infrastructure in south america", "البنية التحتية للنقل في أمريكا الجنوبية"),
    (
        " in ",
        "railway stations on the-national-register-of-historic-places",
        "محطات السكك الحديدية في السجل الوطني للأماكن التاريخية",
    ),
    (" in ", "bulgarian expatriate basketball people", "أعلام كرة سلة بلغاريون مغتربون"),
    (" established in ", "australian rules football clubs", "أندية كرة قدم أسترالية"),
    (" on ", "agricultural buildings and structures", "مبان ومنشآت زراعية"),
    (
        " in ",
        "agricultural buildings and structures on the-national-register-of-historic-places",
        "مبان ومنشآت زراعية في السجل الوطني للأماكن التاريخية",
    ),
    (" to ", "permanent representatives of kyrgyzstan", "مندوبو قيرغيزستان الدائمون"),
    (" by ", "tourism in republic-of ireland", "سياحة في جمهورية أيرلندا"),
    (" opened in ", "railway stations in hong kong", "محطات السكك الحديدية في هونغ كونغ"),
    (" opened in ", "railway stations in spain", "محطات السكك الحديدية في إسبانيا"),
    (
        " in ",
        "bank buildings on the-national-register-of-historic-places",
        "مباني بنوك في السجل الوطني للأماكن التاريخية",
    ),
    (" by ", "nations in the summer olympics", "بلدان في الألعاب الأولمبية الصيفية"),
    (" for ", "pan american games medalists", "فائزون بميداليات دورة الألعاب الأمريكية"),
    (" by ", "universities and colleges in texas", "جامعات وكليات في تكساس"),
    (" in ", "attacks on diplomatic missions", "هجمات على بعثات دبلوماسية"),
    (
        " from ",
        "whig party members of united states house-of-representatives",
        "أعضاء حزب اليمين في مجلس النواب الأمريكي",
    ),
    (
        " from ",
        "federalist party members of united states house-of-representatives",
        "أعضاء الحزب الفيدرالي الأمريكي في مجلس النواب الأمريكي",
    ),
    (" by ", "historic districts in massachusetts", "المناطق التاريخية في ماساتشوستس"),
    (" by ", "rugby union players from west yorkshire", "لاعبو اتحاد رجبي من غرب يوركشاير"),
    (" by ", "railway stations in the philippines", "محطات السكك الحديدية في الفلبين"),
    (" to ", "trinidad and tobago emigrants", "ترنيداديون مهاجرون"),
    (" by ", "unincorporated communities in alaska", "مجتمعات فردية في ألاسكا"),
    (" by ", "1789 in south america", "أمريكا الجنوبية في 1789"),
    (" by ", "parks in south america", "متنزهات في أمريكا الجنوبية"),
    (" disestablished in ", "television channels and stations", "قنوات وشبكات تلفزيونية"),
    (" to ", "permanent representatives of bahrain", "مندوبو البحرين الدائمون"),
    (" opened in ", "railway stations in bangladesh", "محطات السكك الحديدية في بنغلاديش"),
    (" established in ", "art museums and galleries", "متاحف فنية ومعارض"),
    (" opened in ", "railway stations in denmark", "محطات السكك الحديدية في الدنمارك"),
    (" by ", "united states senate candidates", "مرشحو مجلس الشيوخ الأمريكي"),
    (" in ", "spanish expatriate handball players", "لاعبو كرة يد إسبان مغتربون"),
    (" opened in ", "railway stations in poland", "محطات السكك الحديدية في بولندا"),
    (" in ", "impact of covid-19 pandemic", "تأثيرات جائحة فيروس كورونا"),
    (" opened in ", "railway stations in russia", "محطات السكك الحديدية في روسيا"),
    (" for ", "commonwealth games bronze medalists", "فائزون بميداليات برونزية في ألعاب الكومنولث"),
    (
        " in ",
        "buildings and structures on the-national-register-of-historic-places",
        "مبان ومنشآت في السجل الوطني للأماكن التاريخية",
    ),
    (" in ", "attacks on military installations", "هجمات على منشآت عسكرية"),
    (" opened in ", "railway stations in the russian empire", "محطات السكك الحديدية في الإمبراطورية الروسية"),
    (" in ", "riots and civil disorder", "شغب وعصيان مدني"),
    (" by ", "electronic dance music albums", "ألبومات موسيقى الرقص الإلكترونية"),
    (" by ", "sports governing bodies in north america", "هيئات تنظيم رياضية في أمريكا الشمالية"),
    (" by ", "women's footballers in ireland", "لاعبات كرة قدم في أيرلندا"),
    (" in ", "military and war museums", "متاحف عسكرية وحربية"),
    (" from ", "democratic party united states senators", "أعضاء مجلس الشيوخ الأمريكي من الحزب الديمقراطي"),
    (" by ", "universities and colleges in ukraine", "جامعات وكليات في أوكرانيا"),
    (" closed in ", "railway stations in new zealand", "محطات السكك الحديدية في نيوزيلندا"),
    (" for ", "african games bronze medalists", "فائزون بميداليات برونزية في الألعاب الإفريقية"),
    (" in ", "military operations of war", "عمليات عسكرية في الحرب"),
    (
        " involving ",
        "military operations of war in afghanistan (1789–1789)",
        "عمليات عسكرية في الحرب في أفغانستان (1789–1789)",
    ),
    (" by ", "field hockey playerss in germany", "لاعبو هوكي ميدان في ألمانيا"),
    (" in ", "history of petroleum industry", "تاريخ صناعة بترولية"),
    (" in ", "private universities and colleges", "جامعات وكليات خاصة"),
    (" in ", "croatian expatriate basketball people", "أعلام كرة سلة كروات مغتربون"),
    (" to ", "emigrants from the russian empire", "مهاجرون من الإمبراطورية الروسية"),
    (" by ", "railway stations in romania", "محطات السكك الحديدية في رومانيا"),
    (" by ", "female field hockey players", "لاعبات هوكي ميدان"),
    (" in ", "brazilian expatriate basketball people", "أعلام كرة سلة برازيليون مغتربون"),
    (" by ", "tanks of united states", "دبابات الولايات المتحدة"),
    (" by ", "food and drink in europe", "أطعمة ومشروبات في أوروبا"),
    (" to ", "permanent representatives of kazakhstan", "مندوبو كازاخستان الدائمون"),
    (" for ", "islamic solidarity games silver medalists", "فائزون بميداليات فضية في ألعاب التضامن الإسلامي"),
]


@pytest.mark.parametrize("preposition, category, output", data, ids=[x[1] for x in data])
@pytest.mark.fast
def test_get_type_lab_data(preposition: str, category: str, output: str) -> None:
    label, _ = get_type_lab(preposition, category)
    assert label.strip() == output.strip()
