[Biopython-dev] Running Biopython tests on windows xp

Bruce Southey bsouthey at gmail.com
Wed Jan 14 22:48:27 UTC 2009


Peter wrote:
> These are not expected.  The whole test suite passes for me on Windows
> where I have installed Biopython from source.
>
> So you installed Biopython using our Window Installer - how did you
> get the unit tests?  I'm pretty sure the SCOP failures are due to the
> files under Tests\SCOP having Unix line endings instead of Windows
> line endings (we're fixed some similar issues in the past).  Note that
> both the source code archives as *.zip and *.tar.gz use Unix line
> endings internally, but if you used CVS it should have got them with
> Windows line endings for you.
>
> However, most of your test failures do seem to be related to C code in
> some way.  I wonder if this is linked to the virtual environment?  I
> should be able to try the Biopython 1.49 installer with Python 2.5 on
> a Windows machine myself to check that...
>
> The list of failures:
>   
>> test_CAPS ... ERROR
>> test_Cluster ... FAIL
>> test_KDTree ... ERROR
>> test_PDB ... ERROR
>> test_Restriction ... ERROR
>> test_trie ... ERROR
>> test_triefind ... ERROR
>>     
Using IDLE, 'from Bio.Restriction import *' works correctly.

These ones are failures to find the correct biopython installation. 
Both  'python setup.py test' and 'python run_tests.py' are assuming that 
I have built from source and everything is in the local directory. But 
that assumption is wrong since I used the Biopython binary installer so 
technically the tests I run are invalid. The difference for these 
failures can be seen here:

C:\Documents and 
Settings\virtualme\Desktop\Python_packages\biopython-1.49\biopy
thon-1.49\Tests>c:\Python25\python.exe test_KDTree.py
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.
Passed.

C:\Documents and 
Settings\virtualme\Desktop\Python_packages\biopython-1.49\biopy
thon-1.49\Tests>c:\Python25\python.exe run_tests.py test_KDTree.py
test_KDTree ... ERROR

======================================================================
ERROR: test_KDTree
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 125, in runTest
    self.runSafeTest()
  File "run_tests.py", line 138, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_KDTree.py", line 10, in <module>
    from Bio.KDTree.KDTree import _neighbor_test, _test
  File "C:\Documents and 
Settings\virtualme\Desktop\biopython-1.49\biopython-1.4
9\Bio\KDTree\__init__.py", line 10, in <module>
  File "C:\Documents and 
Settings\virtualme\Desktop\biopython-1.49\biopython-1.4
9\Bio\KDTree\KDTree.py", line 20, in <module>
ImportError: cannot import name _CKDTree

----------------------------------------------------------------------
Ran 1 test in 0.100s

FAILED (errors=1)


For the SCOP tests, this is as you say, a 'end of line' issue between 
windows and Linux. I opened 'and dir.cla.scop.txt_test' with wordpad and 
saved it with a new name. The line from testIndex in test_SCOP_Cla.py 
that gave the error index['d4hbia_'] works with the new file but not the 
old file.

I also installed reportlab and biosql and these pass the tests (except 
for the mysql warning with Biosql that Peter reported).

Regards
Bruce



More information about the Biopython-dev mailing list