def test_breed(self):
        x = Genome([1, 2, 3, 4])
        mate = Genome(['a', 'b', 'c', 'd'])
        mock_crossover = MagicMock(return_value=(Genome([1, 2, 'a', 'b']),
            Genome(['a', 'b', 3, 4])))

        with patch('foox.ga.crossover', mock_crossover):
            x.breed(mate)
        self.assertEqual(1, mock_crossover.call_count,
            "Breed does not call crossover function expected number of times.")
        mock_crossover.assert_called_with(x, mate, Genome)
Generate a hash of the given tuple.
dataset/ETHPy150Open ntoll/foox/test/test_ga.py/TestGenome.test_breed--crossover with--dataset/ETHPy150Open codeinthehole/django-cacheback/cacheback/base.py/Job.hash