def test_that_valid_solution_is_identified(self): bnb = BranchAndBound(self.input_data_4) valid_solution = [1, 1, 0, 0] result = bnb.valid(np.array(valid_solution)) self.assertEqual(result, True)
def test_that_invalid_solution_is_identified(self): bnb = BranchAndBound(self.input_data_4) invalid_solution = [1, 0.25, 1, 0] result = bnb.valid(np.array(invalid_solution)) self.assertEqual(result, False)