def testIsValidFalseAnnot(self): false_annot_null = annot.Annotation("slr0399_synechocystis", []) self.failIf(false_annot_null.is_valid()) false_annot_single_ko = annot.Annotation('hsa:124', [['K00002',], ]) self.failIf(false_annot_single_ko.is_valid()) false_annot_multi_kos = annot.Annotation('hsa:124', [['K00001',], ['K00002',] ]) self.failIf(false_annot_multi_kos.is_valid())
def testTestKos(self): myannot = annot.Annotation('hsa:10020', [['K01791',], ['K00885',]]) kos = ['K01791', 'K00885'] self.failUnlessEqual(myannot.get_kos(), kos)
def testIsValidTrueAnnot(self): true_annot_single_ko = annot.Annotation('hsa:124', [['K00001',],]) self.assert_(true_annot_single_ko.is_valid())
def testHasKoNullAnnot(self): """ test for methd: has_ko """ null_annot = annot.Annotation("slr0399_synechocystis", ['K00001',]) self.assert_(null_annot.has_ko())
def testHasKoNullAnnot(self): """ test for methd: has_ko """ null_annot = annot.Annotation("slr0399_synechocystis", []) self.failIf(null_annot.has_ko())