コード例 #1
0
ファイル: test_models.py プロジェクト: yurong2020/cogent3
 def test_model_description(self):
     """correctly grabs function descriptions"""
     all_available = available_models()
     for abbrev, desc in all_available.tolist(["Abbreviation", "Description"]):
         func = getattr(models_module, abbrev)
         doc = func.__doc__.split()
         self.assertEqual(desc.split(), doc)
コード例 #2
0
 def test_model_by_type(self):
     """correctly obtain models by type"""
     for model_type in ["codon", "nucleotide", "protein"]:
         table = available_models(model_type)
         got = table.distinct_values("Model Type")
         self.assertEqual(got, {model_type})
コード例 #3
0
 def test_model_abbreviation(self):
     """make sure getting model abbreviations that exist"""
     got = set(available_models().tolist("Abbreviation"))
     expect = set(["JC69", "CNFGTR", "DSO78"])
     self.assertTrue(expect < got)