def check_validity(self, board, board_size): is_a_soluce, nb_queen = is_soluce(board_size, board) assert is_a_soluce assert nb_queen == board_size
def test_is_not_soluce(self): board = self.get_wrong_board_full() is_a_soluce, nb_queen = is_soluce(4, board) assert not is_a_soluce assert nb_queen == 4
def test_is_soluce_soluce(self): board = self.get_board_soluce() is_a_soluce, nb_queen = is_soluce(4, board) assert is_a_soluce assert nb_queen == 4
def test_is_soluce_not_full(self): board = self.get_good_board_not_full() is_a_soluce, nb_queen = is_soluce(4, board) assert not is_a_soluce assert nb_queen == 3
def test_is_soluce_empty(self): board = generate_board(4) is_a_soluce, nb_queen = is_soluce(4, board) assert not is_a_soluce assert nb_queen == 0