def test_cannot_override_diff_value(self): board = Board() board.x(0, 2) self.assertRaises(AlreadySet, board.o, 0, 2)
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)
def test_column_not_completed(self): board = Board() board.o(0, 2) board.o(1, 1) board.x(2, 0) self.assertFalse(board.completed)
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)
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)
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)
def test_first_line_not_completed_no_winner(self): board = Board() board.x(0, 0) board.x(0, 1) self.assertFalse(board.winner)