Exemple #1
0
 def test_common_words_numbers(self):
     """Tests common words via numbers"""
     self.assertEqual(hw4.common_words('Hi 2 Class', 'Hello 2 Class'), 2)
Exemple #2
0
 def test_common_words_empty_spaces(self):
     """Tests common words via direct entry and a bunch of spaces"""
     self.assertEqual(hw4.common_words("          ", "    "), 0)
Exemple #3
0
 def test_common_words_direct_entry(self):
     """Tests common words via direct entry"""
     self.assertEqual(hw4.common_words('Hi Class', 'Hello world'), 0)
Exemple #4
0
 def test_common_words_phrases(self):
     """Tests common words via pre"""
     self.assertEqual(hw4.common_words(self.phrase1, self.phrase2), 5)
Exemple #5
0
 def test_common_words_empty(self):
     """Tests common words via direct entry and empty strings"""
     self.assertEqual(hw4.common_words("", ""), 0)
Exemple #6
0
 def test_common(self):
     self.assertEqual(hw4.common_words(self.string1, self.string2), 5)
Exemple #7
0
 def test_common_no_common(self):
     self.assertEqual(hw4.common_words('Hi Class', 'Hello world'), 0)
Exemple #8
0
 def test_common_empty(self):
     self.assertEqual(hw4.common_words('',''), 0);
Exemple #9
0
 def test_common_words_default(self):
     """Test common_words with default strings"""
     self.assertEqual(hw4.common_words('Hi Class', 'Hello world'), 0)
     self.assertEqual(hw4.common_words(self.string1, self.string2), 5)
Exemple #10
0
 def test_common_words_empty_string(self):
     """Test common_words with empty string"""
     self.assertEqual(hw4.common_words('', ''), 0)