Back to index

python-biopython  1.60
Public Member Functions
test_PopGen_SimCoal.AppTest Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def tidy
def test_simcoal

Detailed Description

Tests simcoal execution via biopython.

Definition at line 30 of file

Member Function Documentation

Definition at line 33 of file

00034     def setUp(self):
00035         self.tidy()

Here is the call graph for this function:

Definition at line 36 of file

00037     def tearDown(self):
00038         self.tidy()

Here is the call graph for this function:

Test simcoal execution.

Definition at line 48 of file

00049     def test_simcoal(self):
00050         """Test simcoal execution.
00051         """
00052         ctrl = SimCoalController(simcoal_dir)
00053         ctrl.run_simcoal('simple.par', 50, par_dir = 'PopGen')
00054         assert os.path.isdir(os.path.join('PopGen', 'simple')), \
00055                "Output directory not created!"
00056         assert( len(os.listdir(os.path.join('PopGen', 'simple'))) == 52)

Definition at line 39 of file

00040     def tidy(self):
00041         if not os.path.isdir(os.path.join('PopGen', 'simple')):
00042             #Unit test must have failed to invoke simcaol,
00043             #and thus it never created the directory.
00044             return
00045         for file in os.listdir(os.path.join('PopGen', 'simple')):
00046             os.remove(os.sep.join(['PopGen', 'simple', file]))
00047         os.rmdir(os.path.join('PopGen', 'simple'))

Here is the caller graph for this function:

The documentation for this class was generated from the following file: