Exemple #1
0
 def test_cannot_override_diff_value(self):
     board = Board()
     board.x(0, 2)
     self.assertRaises(AlreadySet, board.o, 0, 2)
Exemple #2
0
 def test_first_line_x_winner(self):
     board = Board()
     board.x(0, 0)
     board.x(0, 1)
     board.x(0, 2)
     self.assertEqual(CROSS, board.winner)
Exemple #3
0
 def test_column_not_completed(self):
     board = Board()
     board.o(0, 2)
     board.o(1, 1)
     board.x(2, 0)
     self.assertFalse(board.completed)
Exemple #4
0
 def test_diagonal2_not_completed_no_winner(self):
     board = Board()
     board.o(0, 2)
     board.o(1, 1)
     board.x(2, 0)
     self.assertFalse(board.winner)
Exemple #5
0
 def test_first_column_mixed_no_winner(self):
     board = Board()
     board.x(0, 0)
     board.x(1, 0)
     board.o(2, 0)
     self.assertFalse(board.winner)
Exemple #6
0
 def test_first_line_mixed_no_winner(self):
     board = Board()
     board.x(0, 0)
     board.x(0, 1)
     board.o(0, 2)
     self.assertFalse(board.winner)
Exemple #7
0
 def test_first_line_not_completed_no_winner(self):
     board = Board()
     board.x(0, 0)
     board.x(0, 1)
     self.assertFalse(board.winner)