예제 #1
0
 def setUp(self, pygrDataPath=None, **kwargs):
     # overwrite the PYGRDATAPATH environment variable
     self.tempdir = testutil.TempDir('pygrdata')
     if pygrDataPath is None:
         pygrDataPath = self.tempdir.path
     pygrData.update(pygrDataPath, **kwargs)
     # handy shortcuts
     self.EQ = self.assertEqual
예제 #2
0
 def test_xmlrpc(self):
     "Test XMLRPC"
     pygrData.clear_cache() # force all future requests to reload
     pygrData.update("http://localhost:%s" % self.server.port) # from XMLRPC
     
     check_match(self) # run all our tests
     check_dir(self)
     check_dir_noargs(self)
     check_dir_download(self)
     check_dir_re(self)
     check_bind(self)
     check_bind2(self)
     
     sb_hbb1 = testutil.datafile('sp_hbb1') # test readonly checks
     sp2 = seqdb.BlastDB(sb_hbb1)
     sp2.__doc__ = 'another sp'
     try:
         pygrData.Bio.Seq.sp2 = sp2
         pygrData.commit()
         msg = 'failed to catch bad attempt to write to XMLRPC server'
         raise KeyError(msg)
     except ValueError:
         pass