opt.tests.unit.single_objective.glob.function_one_variable_max_problem package

Submodules

opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem module

class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem.TestExpression(methodName='runTest')

Bases: TestCase

test_raises_value_error_when_domain_low_is_not_a_number()
test_raises_value_error_when_expression_is_none()
test_returns_expression_string()
test_returns_non_empty_string()
test_returns_string_with_valid_characters()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem.TestFunctionOneVariableMaxProblem(methodName='runTest')

Bases: TestCase

test_expression_is_empty_string()
test_expression_is_none()
test_invalid_domain_high_parameter()
test_invalid_domain_low_parameter()
test_invalid_expression_parameter()
test_minimum_values()
test_valid_expression_domain_low_domain_high()
test_valid_expression_domain_low_equal_domain_high()
test_valid_instance_creation()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem.TestStringRep(methodName='runTest')

Bases: TestCase

test_properly_indents_and_groups_string_representation()
test_repr_representation()
test_returns_empty_string_if_delimiter_is_none()
test_returns_empty_string_if_indentation_is_negative()
test_returns_empty_string_if_indentation_symbol_is_none()
test_returns_string_representation_with_specified_parameters()
test_str_representation()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem.Test__Copy__(methodName='runTest')

Bases: TestCase

test_deep_copy()
test_return_new_instance()
test_same_attribute_values()
test_subclass_instance()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem.Test__FromInputFile__(methodName='runTest')

Bases: TestCase

test_empty_input_file()
test_handle_comments_in_input_file()
test_invalid_input_file_path()
test_invalid_input_format()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_funcion_one_variable_problem.Test__LoadFromFile__(methodName='runTest')

Bases: TestCase

test_empty_file()
test_invalid_data_format()
test_invalid_file_path()
test_load_from_valid_txt_file()
test_skip_comments()
test_valid_txt_file()

opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution module

class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.TestCalculateQualityDirectly(methodName='runTest')

Bases: TestCase

test_maximum_valid_representation_and_problem()
test_minimum_valid_representation_and_problem()
test_valid_representation_and_problem()
test_valid_representation_and_problem_is_feasible()
test_valid_representation_and_problem_objective_value()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.TestFunctionOneVariableMaxProblemIntSolution(methodName='runTest')

Bases: TestCase

test_argument_method()
test_copy_method()
test_domain_from_equal_to_domain_to()
test_domain_from_getter()
test_domain_to_getter()
test_native_representation_non_binary_characters()
test_number_of_intervals_equal_to_zero()
test_number_of_intervals_getter()
test_obtain_feasible_representation_greater_than_number_of_intervals()
test_obtain_feasible_representation_less_than_zero()
test_valid_arguments_initialization()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.TestInitRandom(methodName='runTest')

Bases: TestCase

test_overwrite_representation_with_random_integer()
test_set_representation_to_random_integer()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.TestNativeRepresentation(methodName='runTest')

Bases: TestCase

test_all_ones()
test_all_zeros()
test_correct_conversion()
test_empty_string()
test_non_binary_characters()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.TestRepresentationDistanceDirectly(methodName='runTest')

Bases: TestCase

test_distance_binary_and_non_binary_representations()
test_distance_different_lengths()
test_distance_different_lengths_and_values()
test_distance_different_representations()
test_distance_identical_representations()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.TestStringRep(methodName='runTest')

Bases: TestCase

test_empty_parameters()
test_includes_string_representation()
test_no_string_representation()
test_properly_indented_and_formatted()
test_returns_string_representation()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.Test__Init__(methodName='runTest')

Bases: TestCase

test_float_domain()
test_integer_domain()
test_maximum_values()
test_minimum_values()
test_non_integer_number_of_intervals()
test_valid_input_parameters()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution.Test__ObtainFeasibleHelper__(methodName='runTest')

Bases: TestCase

test_representation_equal_to_number_of_intervals()
test_representation_negative()
test_representation_within_range()

opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution_vns_support module

class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution_vns_support.TestFunctionOneVariableMaxProblemIntSolutionVnsSupport(methodName='runTest')

Bases: TestCase

test_local_search_best_improvement_returns_new_solution_with_better_fitness_value()
test_local_search_best_improvement_returns_same_solution_when_k_is_less_than_1_or_greater_than_representation_length()
test_local_search_first_improvement_returns_new_solution_with_better_fitness_value()
test_local_search_first_improvement_returns_same_solution_when_k_is_less_than_1_or_greater_than_representation_length()
test_shaking_returns_false_when_k_is_less_than_or_equal_to_0()
test_shaking_returns_true_when_k_is_greater_than_0_and_solution_is_valid()
test_string_rep_class_name()
test_string_rep_delimiter()
test_string_rep_empty_arguments()
test_string_rep_indentation()
test_string_rep_indentation_symbol()
class opt.tests.unit.single_objective.glob.function_one_variable_max_problem.test_function_one_variable_problem_binary_int_solution_vns_support.Test__Copy__(methodName='runTest')

Bases: TestCase

test_copy_all_attributes()
test_not_modify_original_object()
test_return_deep_copy()
test_return_new_object_empty()
test_return_new_object_no_immutable_attributes()
test_return_new_object_no_mutable_attributes()

Module contents