

def test_return_parents_if_same(self):
    '\n        If both parents have the same chromosome then just return the parents.\n        '
    mum = Genome([1, 2, 3])
    dad = Genome([1, 2, 3])
    result = crossover(mum, dad, Genome)
    self.assertEqual(mum, result[0], 'Child expected to be the same as parent.')
    self.assertEqual(mum, result[0], 'Child expected to be the same as parent.')

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