Exemple #1
0
 def test_all_domains_classified(self):
     domain_names = []
     with open(path.get_full_path(nrps_pks_domains.__file__, "data", "nrpspksdomains.hmm")) as handle:
         for line in handle:
             if line.startswith("NAME"):
                 domain_names.append(line.strip().split()[1])
     missing = [name for name in domain_names if not classify(name)]
     assert not missing, missing
Exemple #2
0
 def test_unclassifiable(self):
     with self.assertRaisesRegex(ValueError, "could not classify"):
         classify("bad-domain-name")
Exemple #3
0
 def test_existing(self):
     assert CLASSIFICATIONS
     for classification, group in CLASSIFICATIONS.items():
         for label in group:
             assert classify(label) == classification