

def test_creates_two_babies(self):
    '\n        If the parents are different ensures that the children are the result\n        of an expected crossover.\n        '
    mum = Genome([1, 2, 3, 4])
    dad = Genome(['a', 'b', 'c', 'd'])
    result = crossover(mum, dad, Genome)
    self.assertEqual(2, len(result))
    expected1 = Genome([1, 2, 'c', 'd'])
    expected2 = Genome(['a', 'b', 3, 4])
    self.assertEqual(expected1, result[0], ('Expected: %r Got: %r' % (expected1, result[0])))
    self.assertEqual(expected2, result[1], ('Expected: %r Got: %r' % (expected2, result[1])))

dataset/ETHPy150Open ntoll/foox/test/test_ga.py TestCrossover.test_creates_two_babies/original