Back to index

python-biopython  1.60
Classes | Functions | Variables
test_GAOrganism Namespace Reference

Classes

class  TestAlphabet
class  CreatePopulationTest
class  OrganismTest

Functions

def genome_generator
def fitness_calculator

Variables

tuple runner = unittest.TextTestRunner(verbosity = 2)

Function Documentation

Calculate fitness for testing purposes.

Definition at line 28 of file test_GAOrganism.py.

00028 
00029 def fitness_calculator(genome):
00030     """Calculate fitness for testing purposes.
00031     """
00032     assert isinstance(genome, MutableSeq), "Expected MutableSeq for a genome."
00033 
00034     regular_seq = genome.toseq()
00035     return int(regular_seq.tostring())

Here is the caller graph for this function:

Generate a genome for testing purposes.

Definition at line 23 of file test_GAOrganism.py.

00023 
00024 def genome_generator():
00025     """Generate a genome for testing purposes.
00026     """
00027     return MutableSeq("1234", TestAlphabet())


Variable Documentation

tuple test_GAOrganism.runner = unittest.TextTestRunner(verbosity = 2)

Definition at line 170 of file test_GAOrganism.py.