Esempio n. 1
0
 def test_add_letter_left_error(self):
     """ Attempt to add a letter that does not belong to either side. """
     with self.assertRaises(ValueError):
         l.Letter("q")
Esempio n. 2
0
 def test_add_letter_right_multi_error(self):
     """ Attempt to add a multiple letter but with an error. """
     with self.assertRaises(ValueError):
         l.Letter(right="TDQ")
Esempio n. 3
0
 def test_add_letter_right_multi_valid(self):
     """ Add multiple letters as a string. """
     letter_actual = set(["B", "T", "D"])
     letter_test = l.Letter(right="BTD").right
     self.assertEqual(letter_actual, letter_test)
Esempio n. 4
0
 def test_add_letter_right_valid(self):
     """ Add a letter that on the right hand side. """
     letter_actual = set(["U"])
     letter_test = l.Letter(right="u").right
     self.assertEqual(letter_actual, letter_test)
Esempio n. 5
0
 def test_add_letter_left_multi_valid(self):
     """ Add multiple letters as a string. """
     letter_actual = set(["S", "T", "R"])
     letter_test = l.Letter("str").left
     self.assertEqual(letter_actual, letter_test)
Esempio n. 6
0
 def test_add_letter_left_valid(self):
     """ Add a valid letter to the left hand side. """
     letter_actual = set(["S"])
     letter_test = l.Letter("s").left