

def test_returns_genome(self):
    '\n        Ensures that the roulette wheel returns a selected genome.\n        '

    class Genome(object):
        '\n            A simple representation of a genome.\n            '

        def __init__(self, fitness):
            self.fitness = fitness
    population = [Genome(random.uniform(0.1, 10.0)) for i in range(4)]
    result = roulette_wheel_selection(population)
    self.assertIsInstance(result, Genome, 'Expected result of roulette_wheel_selection is not a Genome')

dataset/ETHPy150Open ntoll/foox/test/test_ga.py TestRouletteWheelSelection.test_returns_genome/original