def test_input(self):

        assert detect_language("Hello world, how are you?") == "english"
        assert detect_language("Hola mundo que tal estás, yo bien gracias. Todo bien?") == "spanish"
        assert detect_language("Hola mundo que tal estas?") == "portuguese"

        # Unknown lang
        assert detect_language("asdfasdfasdf") == "unknown"
Esempio n. 2
0
    def test_input(self):

        assert detect_language("Hello world, how are you?") == "english"
        assert detect_language(
            "Hola mundo que tal estás, yo bien gracias. Todo bien?"
        ) == "spanish"
        assert detect_language("Hola mundo que tal estas?") == "portuguese"

        # Unknown lang
        assert detect_language("asdfasdfasdf") == "unknown"
Esempio n. 3
0
 def test_empty_input(self):
     assert detect_language("") == "unknown"
 def test_empty_input(self):
     assert detect_language("") == "unknown"