Back to index

python-biopython  1.60
Public Member Functions
test_Crystal.HeteroTestCase Class Reference

List of all members.

Public Member Functions

def testInit
def testLen
def testEquals

Detailed Description

Definition at line 484 of file test_Crystal.py.


Member Function Documentation

Definition at line 503 of file test_Crystal.py.

00503 
00504     def testEquals(self):
00505         u = Hetero('u')
00506         u1 = Hetero('u')
00507         self.assertEqual(u, u1)
00508         self.assertEqual(u, Hetero('U'))
00509         self.assertNotEqual(u, Hetero('u1'))
00510         self.assertNotEqual(u, Hetero('x'))
00511         gna = Hetero('gna')
00512         self.assertEqual(gna, Hetero('gNA'))
00513         self.assertEqual(gna, Hetero('GnA'))
00514         self.assertNotEqual(gna, Hetero('gnb'))
00515         self.assertNotEqual(gna, Hetero('na'))
00516 

Definition at line 486 of file test_Crystal.py.

00486 
00487     def testInit(self):
00488         self.assertRaises(CrystalError, Hetero, 'abcd')
00489         self.assertRaises(CrystalError, Hetero, '')
00490         self.assertRaises(CrystalError, Hetero, 'A@#')
00491         self.assertRaises(CrystalError, Hetero, [])
00492         self.assertRaises(CrystalError, Hetero, {})

Definition at line 493 of file test_Crystal.py.

00493 
00494     def testLen(self):
00495         bru = Hetero('bru')
00496         self.assertEqual(len(bru), 3)
00497         _14w = Hetero('14w')
00498         self.assertEqual(len(_14w), 3)
00499         a = Hetero('a')
00500         self.assertEqual(len(a), 1)
00501         ga = Hetero('ga')
00502         self.assertEqual(len(ga), 2)


The documentation for this class was generated from the following file: