def test_setting_config_attribute_with_wrong_type_has_no_effect(self): config = Config() config.max_runs = 0.5 config.use_extended_pattern_syntax = None config.fitness_function_type = RecombinationType.RANDOM_ONE_POINT_CROSSOVER config.report_path = 0 super().assertNotEqual(config.max_runs, 0.5) super().assertNotEqual(config.use_extended_pattern_syntax, None) super().assertNotEqual(config.fitness_function_type, RecombinationType.RANDOM_ONE_POINT_CROSSOVER) super().assertNotEqual(config.report_path, 0)
def test_find_patterns_when_config_instance_provided(self): """ Checks when setting up a Config instance before find_patterns invocation works """ config = Config() config.max_runs = 10 patterns, _ = find_patterns(self.my_samples) super().assertEqual(10, len(patterns))