def test_starting_population_fitness_ordered(self):
        """
        Ensures that the starting population as returned by the GA is ordered
        according to the fitness function.
        """
        start_pop = [1, 2, 3]

        def fitness(genome):
            """
            For illustrative purposes.
            """
            return genome - genome

        ga = genetic_algorithm(start_pop, fitness, None, None)
        expected = [3, 2, 1]
        actual = ga.next()
        self.assertEqual(actual, expected,
            "Actual: %r Expected: %r" % (actual, expected))
dataset/ETHPy150Open ntoll/foox/test/test_ga.py/TestGeneticAlgorithm.test_starting_population_fitness_ordered/operator `*` -> `-`