Example #1
0
 def test_kurmanci(self):
     text = """
     Luv xelata xwe pêşkêşî 55 milyon kurd û pêşmergeyan kir Zêdetir
     """
     self.assertEqual(dl(text), "Kurmanci")
Example #2
0
 def test_english(self):
     text = """
     JEM Raw is recalling nut butters after health officials found a likely link to a salmonella outbreak. 82 Shares. Email. A salmonella outbreak linked to an organic line of nut butters has sickened 11 people according to the Centers for Disease Control 
     """
     self.assertEqual(dl(text), "English")
Example #3
0
 def test_german(self):
     text = """
     "Die unendliche Geschichte" fasziniert Leser, Hörer und Zuschauer seit fast vierzig Jahren. Eine Kinderjury zeichnete nun die klangvolle Neuvertonung des Klassikers als bestes Kinderhörspiel aus.
     """
     self.assertEqual(dl(text), "German")
Example #4
0
    def test_arabic(self):
        text = """
        وجاء في بيان صادر عن مكتب رئيس الحكومة حيدر العبادي إن الخطوة التركية "انتهاك خطير للسيادة العراقية".

        """
        self.assertEqual(dl(text), "Arabic")
Example #5
0
 def test_french(self):
     text = """
     Trois assaillants ont été tués et deux autres arrêtés vendredi à Bujumbura après avoir tendu une embuscade à Christophe Manirambona, chef du bureau des unités spécialisées, un haut responsable de la police qui n'était pas dans son véhicule.
     """
     self.assertEqual(dl(text), "French")
Example #6
0
 def test_english_iterable(self):
     iterable = ["Washington", "Adams", "Jefferson"]
     self.assertEqual(dl(iterable), "English")
Example #7
0
 def test_mandarin(self):
     text = """
     肺炎疫情:美国纽约州长称“不想当武汉,不想被封城”
     """
     self.assertEqual(dl(text), "Mandarin")
Example #8
0
 def test_sorani(self):
     text = """
     22:18 | دەمیرتاش: كورد گەیشتووەتە "خاڵێكی مەزن" بۆ راگەیاندنی دەوڵەتی خۆی
     """
     self.assertEqual(dl(text), "Sorani")
Example #9
0
 def test_turkish(self):
     text = """
     Amerikan Federal Soruşturma Bürosu (FBI), ABD'nin Kaliforniya Eyaleti'nde Çarşamba günü gerçekleştirilen ve 14 kişinin yaşamını yitirdiği saldırının 'terörizm eylemi' olarak inceleneceğini söyledi.
     """
     self.assertEqual(dl(text), "Turkish")
Example #10
0
 def test_german(self):
     text = """
     "Die unendliche Geschichte" fasziniert Leser, Hörer und Zuschauer seit fast vierzig Jahren. Eine Kinderjury zeichnete nun die klangvolle Neuvertonung des Klassikers als bestes Kinderhörspiel aus.
     """
     self.assertEqual(dl(text), "German")
Example #11
0
 def test_kurmanci(self):
     text = """
     Luv xelata xwe pêşkêşî 55 milyon kurd û pêşmergeyan kir Zêdetir
     """
     self.assertEqual(dl(text), "Kurmanci")
Example #12
0
 def test_english(self):
     text = """
     JEM Raw is recalling nut butters after health officials found a likely link to a salmonella outbreak. 82 Shares. Email. A salmonella outbreak linked to an organic line of nut butters has sickened 11 people according to the Centers for Disease Control 
     """
     self.assertEqual(dl(text), "English")
Example #13
0
 def test_french(self):
     text = """
     Trois assaillants ont été tués et deux autres arrêtés vendredi à Bujumbura après avoir tendu une embuscade à Christophe Manirambona, chef du bureau des unités spécialisées, un haut responsable de la police qui n'était pas dans son véhicule.
     """
     self.assertEqual(dl(text), "French")
Example #14
0
 def test_russian(self):
     text = """
     Коронавирус: в Москве больше тысячи заболевших, в России - 270 новых случаев
     """
     self.assertEqual(dl(text), "Russian")
Example #15
0
 def test_sorani(self):
     text = """
     22:18 | دەمیرتاش: كورد گەیشتووەتە "خاڵێكی مەزن" بۆ راگەیاندنی دەوڵەتی خۆی
     """
     self.assertEqual(dl(text), "Sorani")
Example #16
0
 def test_english_iterable(self):
     iterable = ["Washington", "Adams", "Jefferson"]
     self.assertEqual(dl(iterable), "English")
Example #17
0
 def test_turkish(self):
     text = """
     Amerikan Federal Soruşturma Bürosu (FBI), ABD'nin Kaliforniya Eyaleti'nde Çarşamba günü gerçekleştirilen ve 14 kişinin yaşamını yitirdiği saldırının 'terörizm eylemi' olarak inceleneceğini söyledi.
     """
     self.assertEqual(dl(text), "Turkish")
Example #18
0
 def test_return_as_code(self):
     text = "Bla bla bla I'm not sure where to start."
     self.assertEqual(dl(text, return_as_code=True), "en")
Example #19
0
    def test_arabic(self):
        text = """
        وجاء في بيان صادر عن مكتب رئيس الحكومة حيدر العبادي إن الخطوة التركية "انتهاك خطير للسيادة العراقية".

        """
        self.assertEqual(dl(text), "Arabic")
Example #20
0
 def test_khmer(self):
     text = """ក្រ​សួង​សុខា​ភិ​បាល​ព្រ​មាន​ចាត់​វិធាន​ការ​ ចំ​ពោះ​អ្នក​​ដែល​ផ្សព្វផ្សាយ ​​ឧប​ករណ៍​​​ធ្វើ​តេស្ត​រហ័ស​រក​ជំងឺ​កូវីដ​ ១៩"""
     self.assertEqual(dl(text), "Khmer")