@@ -0,0 +1,1589 @@
+import unittest%0Afrom charset_normalizer.normalizer import CharsetNormalizerMatches as CnM%0Afrom glob import glob%0Afrom os.path import basename%0A%0A%0Aclass TestLanguageDetection(unittest.TestCase):%0A    SHOULD_BE = %7B%0A        'sample.1.ar.srt': 'Arabic',%0A        'sample.1.fr.srt': 'French',%0A        'sample.1.gr.srt': 'Greek',%0A        'sample.1.he.srt': 'Hebrew',%0A        'sample.1.hi.srt': 'English',%0A        'sample.1.ru.srt': 'Russian',%0A        'sample.1.tu.srt': 'Turkish',%0A        'sample.2.ar.srt': 'Arabic',%0A        'sample.3.ar.srt': 'Arabic',%0A        'sample.4.ar.srt': 'Arabic',%0A        'sample.5.ar.srt': 'Arabic',%0A        'sample-chinese.txt': 'Classical Chinese',%0A        'sample-greek.txt': 'Greek',%0A        'sample-greek-2.txt': 'Greek',%0A        'sample-hebrew.txt': 'English',%0A        'sample-hebrew-2.txt': 'Hebrew',%0A        'sample-hebrew-3.txt': 'Hebrew',%0A        'sample-russian.txt': 'Russian',%0A        'sample-russian-2.txt': 'Russian',%0A        'sample-turkish.txt': 'Turkish',%0A        'sample-korean.txt': 'Korean',%0A        'sample-spanish.txt': 'Spanish',%0A        'sample-bulgarian.txt': 'Bulgarian',%0A        'sample-english.bom.txt': 'English'%0A    %7D%0A%0A    def test_language_detection(self):%0A%0A        for path_name in glob('./data/*.srt') + glob('./data/*.txt'):%0A            with self.subTest(path_name):%0A                r_ = CnM.from_path(path_name).best().first()%0A%0A                self.assertEqual(%0A                    TestLanguageDetection.SHOULD_BE%5Bbasename(path_name)%5D,%0A                    r_.language%0A                )%0A%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

Add test to verify if language was detected properly