Пример #1
0
 def test_residue_name(self):
     p = Pae("*")
     self.assertTrue(p.matches(self.atom1))
     p = Pae("cys")
     self.assertTrue(p.matches(self.atom1))
     p = Pae("ser")
     self.assertFalse(p.matches(self.atom1))
     self.atom1.residue_name = "ASN"
     self.assertTrue(Pae("as?").matches(self.atom1))
     self.atom1.residue_name = "SER"
     self.assertFalse(Pae("as?").matches(self.atom1))
     self.assertTrue(Pae("ser70.c?").matches(self.atom1))
Пример #2
0
 def test_misc(self):
     self.assertRaises(SyntaxError, Pae, "x5x5x5x5")
     self.assertRaises(SyntaxError, Pae, "")
     p = Pae("*")
     self.assertTrue(p.matches(9)) # it matches everything!