def test_sexmachine_features_int(self):
     s = DameSexmachine()
     dicc = s.features_int("David")
     self.assertEqual(chr(dicc['last_letter']), 'd')
     self.assertEqual(chr(dicc['first_letter']), 'd')
     self.assertEqual(dicc['count(a)'], 1)
     self.assertEqual(dicc['count(b)'], 0)
     self.assertEqual(dicc['count(c)'], 0)
     self.assertEqual(dicc['count(d)'], 2)
     self.assertEqual(dicc['count(e)'], 0)
     self.assertEqual(dicc['count(f)'], 0)
     self.assertEqual(dicc['count(h)'], 0)
     self.assertEqual(dicc['count(i)'], 1)
     self.assertEqual(dicc['count(v)'], 1)
     self.assertTrue(dicc['count(a)'] > 0)
     self.assertTrue(dicc['vocals'], 2)
     self.assertTrue(dicc['consonants'], 3)
     self.assertEqual(dicc['first_letter_vocal'], 0)
     self.assertEqual(dicc['last_letter_vocal'], 0)
     self.assertTrue(len(dicc.values()) > 30)
 def test_dame_sexmachine_features_int(self):
     s = DameSexmachine()
     f = s.features_int("David")
     self.assertTrue(len(f) > 0)
Пример #3
0
 def test_dame_sexmachine_features_int_method_returns_correct_result(self):
     s = DameSexmachine()
     f = s.features_int("David")
     self.assertTrue(f['syllables'] > 0)
     self.assertTrue(len(f) > 0)