def test_tamil_detected(self): from converters import convert_any_indic_to_braille input_text = "தமிழ்" (text, warnings) = convert_any_indic_to_braille(input_text) self.assertEqual(warnings, "") self.assertNotEqual(text, input_text)
def test_devanagari_detected(self): from converters import convert_any_indic_to_braille input_text = "देवनागरी" (text, warnings) = convert_any_indic_to_braille(input_text) self.assertEqual(warnings, "") self.assertNotEqual(text, input_text)
def test_gujarati_detected(self): from converters import convert_any_indic_to_braille input_text = "ગુજરાતી" (text, warnings) = convert_any_indic_to_braille(input_text) self.assertEqual(warnings, "") self.assertNotEqual(text, input_text)
def test_none_detected(self): from converters import convert_any_indic_to_braille, BB_ERR_UNKNOWN_SCRIPT (text, warnings) = convert_any_indic_to_braille("Non-indic text") self.assertEqual(text, "") self.assertEqual(warnings, BB_ERR_UNKNOWN_SCRIPT)
def test_multiple_detected(self): from converters import convert_any_indic_to_braille, BB_ERR_MANY_SCRIPTS (text, warnings) = convert_any_indic_to_braille("है ল") self.assertEqual(text, "") self.assertEqual(warnings, BB_ERR_MANY_SCRIPTS)