Skip to content

Commit 67a5070

Browse files
fix test_mutate
1 parent 71e3de8 commit 67a5070

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/strategies/test_genetic_algorithm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ def test_random_population():
4343

4444

4545
def test_mutate():
46-
pop = searchspace.get_random_sample(1)
4746

4847
GA = ga.GeneticAlgorithm(1, searchspace)
4948

49+
pop = GA.generate_population()
50+
5051
mutant = GA.mutate(pop[0])
5152
assert len(pop[0]) == len(mutant)
5253
assert mutant[0] in tune_params["x"]

0 commit comments

Comments
 (0)