def test_possible_moves_with_empty_board(self): """ Getting the possible moves from an empty board should return a list containing the numbers in the range [1, 9]. """ board = Board() self.assertListEqual( [1, 2, 3, 4, 5, 6, 7, 8, 9], board.get_possible_moves() )
def test_possible_moves_with_some_pieces(self): """ Getting the possible moves from a board should return the square numbers that have no piece in them. """ board = Board() board.set_square(2, 'X') board.set_square(6, 'O') board.set_square(8, 'X') board.set_square(4, 'O') self.assertListEqual( [1, 3, 5, 7, 9], board.get_possible_moves() )