def test_distance_search_space_infill_should_return_10_samples_from_test_samples(test_samples, know_points):
  [x, y] = test_samples
  [A, Apf] = know_points
  n = 10
  every_point_is_from_sample = False
  for returned_sample in infill_methods.distance_search_space(n, x, y, [], A, Apf)['X'] :
    for X in x :
      every_point_is_from_sample = np.array_equal(returned_sample, X)
      if(every_point_is_from_sample): break
    if(not every_point_is_from_sample): break
  assert(every_point_is_from_sample)
def test_distance_search_space_infill_should_return_5_best_samples(test_samples, know_points, five_farthest_points):
  [x, y] = test_samples
  [A, Apf] = know_points
  [X_far, Y_far] = five_farthest_points
  x = np.append(x, X_far, axis=0)
  y= np.append(y, Y_far, axis=0) 
  n = 5
  every_point_is_from_sample = False
  for returned_sample in infill_methods.distance_search_space(n, x, y, [], A, Apf)['X'] :
    for X in X_far :
      every_point_is_from_sample = np.array_equal(returned_sample, X)
      if(every_point_is_from_sample): break
    if(not every_point_is_from_sample): break
  assert(every_point_is_from_sample)
def test_distance_search_space_infill_should_return_30_samples(test_samples, know_points):
  [x, y] =test_samples
  [A, Apf] = know_points
  n = 30
  assert(len(infill_methods.distance_search_space(n, x, y, [], A, Apf)['X'])==30)
def test_distance_search_space_infill_should_return_dict_with_X_F_G(variable_name, test_samples, know_points):
  [x, y] =test_samples
  [A, Apf] = know_points
  n = 10
  assert(variable_name in infill_methods.distance_search_space(n, x, y, [], A, Apf))
def test_distance_search_space_infill_should_return_a_dict(test_samples, know_points):
  [x, y] =test_samples
  [A, Apf] = know_points
  n = 10
  assert (type(infill_methods.distance_search_space(n, x, y, [], A, Apf)) is dict )