[SciPy-dev] the state of scipy unit tests

Fernando Perez fperez.net at gmail.com
Mon Nov 24 01:31:03 EST 2008


Howdy,

On Sun, Nov 23, 2008 at 8:25 PM, Jarrod Millman <millman at berkeley.edu> wrote:
> On Sun, Nov 23, 2008 at 7:55 PM,  <josef.pktd at gmail.com> wrote:
>> My initial attempts to use decorators were not very successful, since
>> nose doesn't allow to decorate test generators. One option would be to
>> label most of my test functions with slow, but I haven't tried this
>> yet. In the old test system, it was possible to assign levels to the
>> tests. I don't know if or how it is possible to label my tests so that
>> a few basic ones are run on a low level and the other ones only at
>> higher levels.
>
> Fernando Perez wrote some code to allow you to decorate test
> generators (he mentioned it in an earlier thread, but I don't think we
> followed up on it).  He also raised the question about this at a
> Baypiggies meeting and Alex Martelli blogged about his thoughts here:
> http://aleaxit.blogspot.com/2008/11/python-introspecting-for-generator-vs.html
>
> I'll talk to Fernando tomorrow and make sure we follow-up on this.

Sorry, I got busy with other things.  Here's the diff for decorators,
with an implementation that works with generators and also allows the
test condition to be a callable (very useful for conditions that you
want to evaluate only at suite run time, not at import time).  I
hadn't sent it because I wanted to polish it and write some tests for
it, but here it is for now.

I also included a patch for the verbosity problem: the issue is that
we're hardcoding '-s' in the test runner, which suppresses stdout
capture.  This should instead be an option for the user (like
test(capture=False)).  That diff just disables -s, so it's not
finished, but I don't have time right now to implement the complete
solution.  At least I hope pointing in the right direction will be
useful if someone else can finish.

Cheers,

f
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decorators.diff
Type: text/x-diff
Size: 3155 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20081123/f52a8b33/attachment.diff>


More information about the SciPy-Dev mailing list