def test_swap_mutator_large_pmut(self, rand_mock): rand_mock.return_value = 0 expected_result = [1, 0, 0] Mutators.G1DBinaryStringMutatorSwap(self.genome, pmut=0.5) self.assertEqual(self.genome.genomeList, expected_result)
def test_swap_mutator_small_pmut(self, coin_flip_mock): coin_flip_mock.return_value = 0 expected_result = [1, 0, 0] Mutators.G1DBinaryStringMutatorSwap(self.genome, pmut=0.1) self.assertEqual(self.genome.genomeList, expected_result)