Beispiel #1
0
 def test_null(self):
     """
     testing null
     """
     with self.assertRaises(Exception) as context:
         englishtofrench(None)
     self.assertTrue('ApiException' in context.exception)
Beispiel #2
0
 def test_empty(self):
     self.assertEqual(englishtofrench(""), "")
Beispiel #3
0
 def test_null(self):
     self.assertEqual(englishtofrench(None), "")
Beispiel #4
0
 def test_sentence2(self):
     self.assertEqual(englishtofrench("How old are you?"), "Quel âge as-tu?")
Beispiel #5
0
 def test_sentence1(self):
     self.assertEqual(englishtofrench("Hello everyone"), "Bonjour tout le monde")
 def test_englishtofrench(self):
     '''Tests for french translation'''
     self.assertIsNone(None, "No input provided")
     self.assertEqual(englishtofrench("Hello"), "Bonjour")
     self.assertEqual(englishtofrench("How are you"), "Comment vous êtes")
     self.assertEqual(englishtofrench("Goodbye"), "Au revoir")
Beispiel #7
0
 def test_other(self):
     """
     testing nice to meet you with French
     """
     self.assertEqual(englishtofrench("nice to meet you"), "Gentiez de vous rencontrer")
Beispiel #8
0
 def test_hello(self):
     """
     testing hello with French
     """
     self.assertEqual(englishtofrench("hello"), "Bonjour")
 def test_englishtofrench(self): 
     self.assertEqual(englishtofrench(""), "Input is empty")
     self.assertEqual(englishtofrench("Hello"), "Bonjour")
     self.assertNotEqual(englishtofrench("Hey"), "Bonjour")
Beispiel #10
0
 def test1(self):
     self.assertEqual(englishtofrench("hello"),"Bonjour")
     self.assertEqual(englishtofrench("welcome"),"Bienvenue")
     self.assertEqual(englishtofrench("love"),"Amour")