Beispiel #1
0
	def test_collapseLetters(self):
		self.assertEqual('a', collapse.dominantLetter(['a', 'a', 'b', 'f', 'a'], self.placeholder))
Beispiel #2
0
	def test_collapseLetters_twoDominantLetters(self):
		self.assertEqual(self.placeholder, collapse.dominantLetter(['a', 'a', 'b', 'c', 'b'], self.placeholder))
Beispiel #3
0
	def test_collapseLetters_dominantLetterComesLast(self):
		self.assertEqual('x', collapse.dominantLetter(['a', 'a', 'b', 'c', 'b', 'x', 'x', 'x'], self.placeholder))
Beispiel #4
0
	def test_collapseLetters_emptyList(self):
		self.assertIsNone(collapse.dominantLetter([], self.placeholder))
Beispiel #5
0
 def test_collapseLetters(self):
     self.assertEqual(
         'a',
         collapse.dominantLetter(['a', 'a', 'b', 'f', 'a'],
                                 self.placeholder))
Beispiel #6
0
 def test_collapseLetters_dominantLetterComesLast(self):
     self.assertEqual(
         'x',
         collapse.dominantLetter(['a', 'a', 'b', 'c', 'b', 'x', 'x', 'x'],
                                 self.placeholder))
Beispiel #7
0
 def test_collapseLetters_twoDominantLetters(self):
     self.assertEqual(
         self.placeholder,
         collapse.dominantLetter(['a', 'a', 'b', 'c', 'b'],
                                 self.placeholder))
Beispiel #8
0
 def test_collapseLetters_emptyList(self):
     self.assertIsNone(collapse.dominantLetter([], self.placeholder))