Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_SCOP_Hie.HieTests Class Reference

List of all members.

Public Member Functions

def setUp
def testParse
def testStr
def testError

Public Attributes

 filename

Detailed Description

Definition at line 16 of file test_SCOP_Hie.py.


Member Function Documentation

Definition at line 18 of file test_SCOP_Hie.py.

00018 
00019     def setUp(self):
00020         self.filename = './SCOP/dir.hie.scop.txt_test'

Test if a corrupt record raises the appropriate exception

Definition at line 43 of file test_SCOP_Hie.py.

00043 
00044     def testError(self):
00045         """Test if a corrupt record raises the appropriate exception"""
00046         corruptRec = "4926sdfhjhfgyjdfyg"
00047         self.assertRaises(ValueError, Hie.Record, corruptRec)
00048 

Test if all records in a HIE file are being read

Definition at line 21 of file test_SCOP_Hie.py.

00021 
00022     def testParse(self):
00023         """Test if all records in a HIE file are being read"""
00024         f = open(self.filename)
00025         try: 
00026             count = 0
00027             for record in Hie.parse(f):
00028                 count +=1
00029             self.assertEqual(count, 21)
00030         finally:
00031             f.close()

Here is the call graph for this function:

Test if we can convert each record to a string correctly

Definition at line 32 of file test_SCOP_Hie.py.

00032 
00033     def testStr(self):
00034         """Test if we can convert each record to a string correctly"""
00035         f = open(self.filename)
00036         try: 
00037             for line in f:
00038                 record = Hie.Record(line)
00039                 #End of line is platform dependent. Strip it off
00040                 self.assertEqual(str(record).rstrip(), line.rstrip())
00041         finally:
00042             f.close()        

Here is the call graph for this function:


Member Data Documentation

Definition at line 19 of file test_SCOP_Hie.py.


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