[Biopython-dev] Re: making new release

Brad Chapman chapmanb at uga.edu
Sat Jun 14 13:50:02 EDT 2003


Hey Michael;

> > test_GFF is also failing for me:
> 
> Do you have MySQLdb installed? Even if it's not installed I get:
> 
> grouse at indy ~/biopython/Tests
> $ python run_tests.py test_GFF.py
> test_GFF ... Skipping test because of import error: No module named MySQLdb
> ok
> 
> Otherwise, works for me...
> 
> Would you please cvs update again and if you still can't get a pass I
> will take more extreme measures...

Yeah, I'm a moron. I should have looked at this more closely. I do
have MySQL installed, but I don't have everything set up to do the
test that is failing. I checked out the code, and it looks like I'd
have to have the environmental variable MYSQLPASS set and the
wormbase GFF stuff, which I don't have. 

This is cool, but what do you think about the attached diff to
test_GFF.py? It raises an import error if things aren't set
up for the test, which seems better then getting a fail. If it's
cool with you I can check it in, or we can think of some other plan.

Sorry, I should have looked at this more carefully before sending
out that off-the-cuff message earlier.

Brad
-------------- next part --------------
*** test_GFF.py.orig	Sat Jun 14 13:38:41 2003
--- test_GFF.py	Sat Jun 14 13:42:59 2003
***************
*** 1,7 ****
  #!/usr/bin/env python
  """Test the Bio.GFF module and dependencies
  """
! 
  import MySQLdb
  import Bio.GFF
  import Bio.GFF.GenericTools
--- 1,7 ----
  #!/usr/bin/env python
  """Test the Bio.GFF module and dependencies
  """
! import os
  import MySQLdb
  import Bio.GFF
  import Bio.GFF.GenericTools
***************
*** 16,20 ****
  print "Bio.GFF.easy doctests complete."
  
  print "Running Bio.GFF doctests..."
! Bio.GFF._test()
  print "Bio.GFF doctests complete."
--- 16,25 ----
  print "Bio.GFF.easy doctests complete."
  
  print "Running Bio.GFF doctests..."
! # only do the test if we are set up to do it. We need to have MYSQLPASS
! # set and have a GFF wormbase installed (see the code in Bio/GFF/__init_.py
! if os.environ.has_key("MYSQLPASS"):
!     Bio.GFF._test()
! else:
!     raise ImportError("Environment not configured for GFF test")
  print "Bio.GFF doctests complete."


More information about the Biopython-dev mailing list