[BioPython] Some proposed code-cleanup

Jeffrey Chang jchang at jeffchang.com
Mon Jun 23 09:55:34 EDT 2003


On Monday, June 23, 2003, at 01:58  AM, Andreas Kuntzagk wrote:

[replacing UserDict, etc with the types]

>> However, it does cause some problems.  For example, if you apply
>> the patches to SubsMat/__init__.py and FreqTable.py, the regression
>> tests fail!  I don't think we should accept these fixes until we know
>> that they won't break current code.
>
> I'm sorry. I tried the regression tests and all seemed fine. What I
> didn't notice was, the tests used my already installed biopython and 
> not
> the code from the build-directory. Grr, why do I keep tripping over 
> this
> errors? Shouldn't the "python setup.py test" use the directory it is
> positioned in? If it is required to set PYTHONPATH before test, it
> should be mentioned in the README. I will look into the problems now to
> see if I could find out.

Yes, we should do something about this.  It has caused us problems many 
times.  Probably the best thing to do is to modify run_tests.py to:
- identify its directory
- insert the build path (../build/lib.XXX/Bio, etc) to the front of 
sys.path, if it exists
- insert the source path (../Bio) to the front of sys.path, if it exists

Jeff



More information about the BioPython mailing list