Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

Test ability to cause mutations.

Definition at line 71 of file test_GAMutation.py.

References test_GAMutation.MutationHelper._always_mutate().

    def test_always_mutate(self):
        """Test ability to cause mutations.
        mutator = ConversionMutation(mutation_rate = 1.0)

        # when we mutate randomly by chance, we expect to get 2/3
        # visible mutations (there are three letters in the alphabet and
        # one change cannot be observed since it is a mutation back to itself)
        # For a four letter genome, the chance of being exactly the same
        # after mutations is about .01, so being better than 90% different
        # if a reasonable expectation.
        expected_percent = .9

        self._always_mutate(mutator, expected_percent)

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index