💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Reduce test complexity to work with memory available on GitHub actions
davidmezzetti4907be4346da
diff --git a/test/python/testtranslation.py b/test/python/testtranslation.pyindex 86c12f3b..68048bad 100644--- a/test/python/testtranslation.py+++ b/test/python/testtranslation.py@@ -20,12 +20,20 @@ class TestTranslation(unittest.TestCase):translate = Translation()+ # Validate translation from English - Spanishtext = "This is a test translation into Spanish"translation = translate(text, "es")-- # Validate translation textself.assertEqual(translation, "Esta es una traducción de prueba al español")+ # Validate no translation+ translation = translate("Esta es una traducción de prueba al español", "es")+ self.assertEqual(text, translation)++ # Validate long translation text+ text = "This is a test translation to Spanish. " * 100+ translation = translate(text, "es")+ self.assertIsNotNone(translation)+@unittest.skipIf(os.name == "nt", "M2M100 skipped on Windows")def testM2M100Translation(self):"""@@ -38,29 +46,3 @@ class TestTranslation(unittest.TestCase):# Validate translation textself.assertEqual(text, "Ovo je testni prijevod na hrvatski")-- def testNoTranslation(self):- """- Tests translation skipped when text already in destination language- """-- translate = Translation()-- text = "This is a test translation to English"- translation = translate(text, "en")-- # Validate no translation- self.assertEqual(text, translation)-- def testLongTranslation(self):- """- Tests a translation longer than max tokenization length.- """-- translate = Translation()-- text = "This is a test translation to Spanish. " * 100- translation = translate(text, "es")-- # Validate translation text- self.assertIsNotNone(translation)