コード例 #1
0
    def test_file_doesnt_exist(self):
        '''
	   test a dcd which doent exist
	   '''
        filename = 'file-notexist.dcd'
        dcdFileName = DataPath + filename
        stdoutFileName = filename + '.stdiout'
        pf = dcdio.open_dcd_read(dcdFileName)
        sys.stdout = open(stdoutFileName, 'w')
        self.o.close_dcd_read(pf)
        sys.stdout = sys.__stdout__
        code = string.split(open(stdoutFileName).read())[2]
        self.assertEqual(int(code), -1)
        os.remove(stdoutFileName)
コード例 #2
0
   def test_file_doesnt_exist(self):
      '''
	   test a dcd which doent exist
	   '''
      filename = 'file-notexist.dcd'
      dcdFileName = DataPath+filename
      stdoutFileName = filename+'.stdiout'
      pf = dcdio.open_dcd_read(dcdFileName)
      sys.stdout = open(stdoutFileName,'w')
      self.o.close_dcd_read(pf)
      sys.stdout = sys.__stdout__
      code=string.split(open(stdoutFileName).read())[2]
      self.assertEqual(int(code), -1)
      os.remove(stdoutFileName)
コード例 #3
0
    def test_1ATM(self):
        '''
	   test a dcd with 2 frames based on an 1-atom pdb
	   '''
        #
        filename = '1ATM.dcd'
        dcdFileName = DataPath + filename
        stdoutFileName = filename + '.stdiout'
        pf = dcdio.open_dcd_read(dcdFileName)
        sys.stdout = open(stdoutFileName, 'w')
        self.o.close_dcd_read(pf)
        sys.stdout = sys.__stdout__
        code = string.split(open(stdoutFileName).read())[2]
        self.assertEqual(int(code), 0)
        os.remove(stdoutFileName)
コード例 #4
0
    def test_rna_6point4gb(self):
        '''
	   test a dcd of size 6.4gb based on a rna molecule
	   '''
        #
        filename = "rna-6.4g.dcd"
        dcdFileName = os.path.join('/tmp/', filename)
        stdoutFileName = filename + '.stdiout'
        pf = dcdio.open_dcd_read(dcdFileName)
        sys.stdout = open(stdoutFileName, 'w')
        self.o.close_dcd_read(pf)
        sys.stdout = sys.__stdout__
        code = string.split(open(stdoutFileName).read())[2]
        self.assertEqual(int(code), 0)
        os.remove(stdoutFileName)
コード例 #5
0
 def test_rna_1to10(self):
     '''
     test a dcd with 10 frames based on a 2-aa pdb
     '''
   
     filename = 'rna-1to10.dcd'
     dcdFileName = DataPath+filename
     stdoutFileName = filename+'.stdiout'
     pf = dcdio.open_dcd_read(dcdFileName)
     sys.stdout = open(stdoutFileName,'w')
     self.o.close_dcd_read(pf)
     sys.stdout = sys.__stdout__
     code=string.split(open(stdoutFileName).read())[2]
     self.assertEqual(int(code), 0)
     os.remove(stdoutFileName)
コード例 #6
0
    def test_rna_6point4gb(self):
        '''
        test a dcd of size 6.4gb based on a rna molecule
        '''

        filename = "rna-6.4g.dcd"
        dcdFileName = os.path.join('/tmp/',filename)
        stdoutFileName = filename+'.stdiout'
        pf = dcdio.open_dcd_read(dcdFileName)
        sys.stdout = open(stdoutFileName,'w')
        self.o.close_dcd_read(pf)
        sys.stdout = sys.__stdout__
        code=string.split(open(stdoutFileName).read())[2]
        self.assertEqual(int(code), 0)
        os.remove(stdoutFileName)
コード例 #7
0
   def test_1ATM(self):
      '''
	   test a dcd with 2 frames based on an 1-atom pdb
	   '''
      #
      filename = '1ATM.dcd'
      dcdFileName = DataPath+filename
      stdoutFileName = filename+'.stdiout'
      pf = dcdio.open_dcd_read(dcdFileName)
      sys.stdout = open(stdoutFileName,'w')
      self.o.close_dcd_read(pf)
      sys.stdout = sys.__stdout__
      code=string.split(open(stdoutFileName).read())[2]
      self.assertEqual(int(code), 0)
      os.remove(stdoutFileName)