def test_it_should_return_an_array_of_strings(): params["pool"] = reproduction.reproduce(params) asserted_pool = crossover.crossover(params) for asserted in asserted_pool: assert isinstance(asserted, str)
def test_it_should_mutate_a_pool_returning_n_strings(): params['pool'] = reproduction.reproduce(params) crossed_over = crossover.crossover(params) asserted_pool = mutation.mutate_pool(crossed_over, mutation_probability) for asserted in asserted_pool: assert isinstance(asserted, str)
def test_it_should_return_an_array_of_size_2(): params["pool"] = reproduction.reproduce(params) asserted_pool = crossover.crossover(params) assert len(asserted_pool) >= 2
def test_it_should_mutate_a_pool_returning_2_strings(): params['pool'] = reproduction.reproduce(params) crossed_over = crossover.crossover(params) asserted_pool = mutation.mutate_pool(crossed_over, mutation_probability) assert len(asserted_pool) >= 2