def test_haploidy(self): """Test haploidy.""" ctrl = GenePopController() (allFis, allFst, allFit), itr = ctrl.calc_fst_all("PopGen" + os.sep + "haplo.gen") litr = list(itr) assert not isinstance(allFst, int) assert len(litr) == 37 assert litr[36][0] == "Locus37"
def test_fst_all(self): """Test genepop execution on all fst.""" ctrl = GenePopController() (allFis, allFst, allFit), itr = ctrl.calc_fst_all("PopGen" + os.sep + "c2line.gen") results = list(itr) assert (len(results) == 3) assert (results[0][0] == "136255903") assert (results[1][3] - 0.33 < 0.01)
def test_haploidy(self): """Test haploidy.""" ctrl = GenePopController() (allFis, allFst, allFit), itr = ctrl.calc_fst_all("PopGen" + os.sep + "haplo.gen") litr = list(itr) assert not isinstance(allFst, int) assert len(litr) == 37 assert litr[36][0] == "Locus37"
def test_fst_all(self): """Test genepop execution on all fst.""" ctrl = GenePopController() (allFis, allFst, allFit), itr = ctrl.calc_fst_all("PopGen" + os.sep + "c2line.gen") results = list(itr) assert (len(results) == 3) assert (results[0][0] == "136255903") assert (results[1][3] - 0.33 < 0.01)
def test_haploidy(self): """Test haploidy.""" ctrl = GenePopController() path = os.path.join("PopGen", "haplo.gen") (allFis, allFst, allFit), itr = ctrl.calc_fst_all(path) litr = list(itr) self.assertNotIsInstance(allFst, int) self.assertEqual(len(litr), 37) self.assertEqual(litr[36][0], "Locus37")
def test_fst_all(self): """Test genepop execution on all fst.""" ctrl = GenePopController() path = os.path.join("PopGen", "c2line.gen") (allFis, allFst, allFit), itr = ctrl.calc_fst_all(path) results = list(itr) self.assertEqual(len(results), 3) self.assertEqual(results[0][0], "136255903") self.assertAlmostEqual(results[1][3], 0.335846)