Back to index

python-biopython  1.60
Public Member Functions | Static Public Attributes
test_SCOP_Residues.ResiduesTests Class Reference

List of all members.

Public Member Functions

def testParse
def testStr
def testAstralParse
def testPdbId
def testJustPdbId
def testParseError

Static Public Attributes

tuple res

Detailed Description

Definition at line 14 of file test_SCOP_Residues.py.


Member Function Documentation

Test if we can parse residue subsets enclosed in brackets

Definition at line 41 of file test_SCOP_Residues.py.

00041 
00042     def testAstralParse(self):
00043         """Test if we can parse residue subsets enclosed in brackets"""
00044         for loc in self.res:
00045             r = Residues("("+loc[0]+")")
00046             self.assertEqual(r.fragments, loc[1])

Definition at line 64 of file test_SCOP_Residues.py.

00064 
00065     def testJustPdbId(self):
00066         r = Residues("1sds")
00067         self.assertEqual(r.pdbid, "1sds")
00068         self.assertFalse(r.fragments)
00069 

Definition at line 31 of file test_SCOP_Residues.py.

00031 
00032     def testParse(self):
00033         for loc in self.res:
00034             r = Residues(loc[0])
00035             self.assertEqual(r.fragments, loc[1])

Definition at line 70 of file test_SCOP_Residues.py.

00070 
00071     def testParseError(self):
00072         self.assertRaises(ValueError, Residues, "09324923423hh./;,.389")
00073 
00074 

Definition at line 47 of file test_SCOP_Residues.py.

00047 
00048     def testPdbId(self):
00049         pdbid ="1ddf"
00050         for loc in self.res:
00051             r = Residues("\t 1ddf \t"+loc[0]+"\t\n\n\n")
00052             self.assertEqual(r.pdbid, pdbid)
00053             self.assertEqual(str(r), pdbid+" "+loc[0])
00054 
00055             r = Residues(pdbid+" "+loc[0])
00056             self.assertEqual(r.pdbid, pdbid)
00057             self.assertEqual(str(r), pdbid+" "+loc[0])
00058 
00059 
00060             r = Residues("104l A:112-113")
00061             self.assertEqual(r.pdbid, "104l")
00062             self.assertEqual(r.fragments, (('A', '112', '113'),))
00063 
            

Definition at line 36 of file test_SCOP_Residues.py.

00036 
00037     def testStr(self):
00038         for loc in self.res:
00039             r = Residues(loc[0])
00040             self.assertEqual(str(r), loc[0])


Member Data Documentation

Initial value:
(
        ( "-",           () ),
        ( "A:",          (("A", "", ""),) ),
        ( "1:",          (("1", "", ""),) ),
        ( "1-100",       (("", "1", "100"),)  ),
        ( "B:1-101",     (("B",   "1" ,"101"),) ),
        ( "1:1a-100a",   (("1", "1a", "100a"),) ),
        ( "a:-100a--1a", (("a", "-100a", "-1a"),) ),
        ( "-1-100",      (("", "-1", "100"),) ),
        ( "-1-100",      (("", "-1", "100"),) ),
        ( "A:12-19,A:23-25", (("A","12","19"),("A","23","25")) ),
        ( "12-19,1:23-25", (("","12","19"),("1","23","25")) ),
        ( "0-1,1:-1a-25a,T:", (("","0","1"),("1","-1a","25a"),("T","","")) ),
        )

Definition at line 15 of file test_SCOP_Residues.py.


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