[SciPy-User] Installation checklist for SciPy tutorials

Dav Clark dav at alum.mit.edu
Sun Aug 9 20:33:06 EDT 2009


Hey Fernando (and Ondrej and...),

I ran the adv_tut... script in EPD 4.3.0, and during the sympy test,  
it drops into pdb.  I'm guessing this is because you're using the -- 
pdb option in the argv to nose.runmodule, and so when you raise an  
exception, you drop the user into pdb.  Have a look at the transcript  
below... I think you'll agree that this output is pretty cryptic!

I'm running EPD 4.3.0, which the advanced tutorial (by Ondrej Certik)  
says is OK for sympy (even though it's not the "required" sympy  
version - I'm guessing there are some downstream fixes to the "0.6.2"  
version in EPD?).  You could figure out it's EPD 4.3.0 by parsing  
sys.version in validate_sympy.

But I think the deeper issue is that you're throwing an exception that  
for some reason doesn't get caught by nose, but rather drops the user  
into pdb.  Other "exceptions" (such as the nt.assert_true in  
validate_cython) do get handled in a sensible way by nose.  Should all  
exceptions be nose assertions? Or is there some deeper reason for  
having some tests actually raise {\tt Exceptions}? On the flipside,  
removing the '--pdb' option makes the script do what you expect a unit- 
test script to do.

Anyway, I don't really know what I'm doing with nose at this point,  
but I figured removing the '--pdb' makes pretty good sense.  I also  
made the change to look for EPD 4.3.0 in validate_sympy.  Ondrej (or  
anyone else), please correct me if my understanding of the tutorial  
description is incorrect! Inline, I've also included my transcript  
from your original script on EPD 4.3.0 (OSX intel) below...

Cheers,
Dav

In [2]: run adv_tut_checklist.py
Running tests:
__main__.test_imports('setuptools', None) ... MOD: setuptools,  
version: 0.6c9-s1
ok
__main__.test_imports('IPython', None) ... MOD: IPython, version: 0.9.1
ok
__main__.test_imports('numpy', None) ... MOD: numpy, version: 1.3.0
ok
__main__.test_imports('scipy', None) ... MOD: scipy, version:  
0.8.0.dev5698
ok
__main__.test_imports('scipy.io', None) ... MOD: scipy.io, version:  
*no info*
ok
__main__.test_imports('matplotlib', <function validate_mpl at  
0x186bf30>) ... MOD: matplotlib, version: 0.98.5.2
ok
__main__.test_imports('pylab', None) ... MOD: pylab, version: *no info*
ok
__main__.test_imports('enthought.mayavi.api', None) ... MOD:  
enthought.mayavi.api, version: 3.2.0n2
ok
__main__.test_imports('scipy.weave', None) ... MOD: scipy.weave,  
version: 0.4.9
ok
__main__.test_imports('sympy', <function validate_sympy at  
0x186bfb0>) ... > /Users/dav/Desktop/tmp-testdata-Leycyo/ 
adv_tut_checklist.py(90)validate_sympy()
-> (version, min_version))
(Pdb)

[That's where the script stops executing!  You can get a bt or  
similar, but that's pretty opaque too.  Note the explicit lack of  
actual error message... I guess this is how you test if we are really  
"advanced"?]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: adv_tut_checklist.py
Type: text/x-python-script
Size: 10071 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090809/39fe2b24/attachment.bin>
-------------- next part --------------



More information about the SciPy-User mailing list