Added Default for gene impl and setter example in Easy GA

This commit is contained in:
danielwilczak101
2020-10-15 01:46:13 -04:00
parent e96d392cf9
commit ec1b67fc00
3 changed files with 20 additions and 17 deletions

View File

@ -5,12 +5,13 @@ import EasyGA
# python3 -m pytest
def test_chromosome_length():
ga = EasyGA.GA()
ga.chromosome_length = 100
ga.evolve()
for i in range(0,100):
ga = EasyGA.GA()
ga.chromosome_length = 100
ga.evolve()
""" Test to see if the actual chromosome length is the same as defined."""
assert ga.population.chromosome_list[0].size() == ga.chromosome_length
""" Test to see if the actual chromosome length is the same as defined."""
assert ga.population.chromosome_list[0].size() == ga.chromosome_length
def test_second():