示例#1
0
 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
示例#2
0
 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
示例#3
0
 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
示例#4
0
 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
示例#5
0
 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