Exemplo n.º 1
0
	def test_solve_sudoku_with_Bactracking_return_None_if_sudoku_is_not_solved(self):
		backtracking = Backtracking(self.mtrx_unsolved)
		solved_sudoku_not_correct = backtracking.solve()
		self.assertEqual(None,solved_sudoku_not_correct)
Exemplo n.º 2
0
	def test_solve_sudoku_with_Bactracking_return_None_if_sudoku_has_multiple_solution(self):
		backtracking = Backtracking(self.mtrx_multiple)
		solved_sudoku_multiple = backtracking.solve()
		self.assertEqual(None,solved_sudoku_multiple)
Exemplo n.º 3
0
	def test_solve_matrix_return_a_solved_sudoku(self):
		backtracking = Backtracking(self.mtrx_to_solve)
		solved_sudoku_matrix = backtracking.solve().first_matrix
		self.assertEqual(self.mtrx_solved.first_matrix, solved_sudoku_matrix)