[python] Re: [wingide-users] Tests in Wing IDE 3.0

Jaime Wyant programmer.py at gmail.com
Mon Nov 19 13:22:24 MST 2007


Perhaps you're thinking of it incorrectly?  If you're current test suite
does all the cool stuff that nosetests does, then no you do not gain any
advantages.

But if your test suite does not do them all, maybe you are missing some
advantage.

(Hmm.. this topic seems to be going on a tangent...  I don't understand what
this has to do with testing under wing, but here goes...)

Here's some of the cool things that nose does for me.  I am by no means a
`nose expert`.  I just use it to test my code and get coverage reports.

1.  Easy use.
     Store my tests in some test directory.  Then run nosetests, pointing it
to that directory.  That is pretty simple and quick.  I don't have to
remember much, except to derive my tests from unittest.TestCase.  Nose does
the rest.

2.  Easy coverage tests.
    With the coverage plugin, nose will tell me what I did / did not test.
This is pretty slick.  Below is an example of using this.

$ nosetests23 --with-coverage --cover-package=main  tests
.................
Name    Stmts   Exec  Cover   Missing
-------------------------------------
main      236    223    94%   182-186, 208-210, 218, 266, 339, 515, 583
----------------------------------------------------------------------
Ran 17 tests in 11.261s

OK

3.  Works with twisted :).  I only have one `pet` twisted project, and my
test cases work with nosetests.

I am not sure why we are discussing the virtues of nose anyway.  But I'm
such a nose fanboy, that I thought I'd tell the world why I love it :).

jw

On Nov 19, 2007 2:03 PM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:

> Lawrence Oluyede wrote:
> >> I've always understood that the *main* feature of nose is test
> >> autodiscovery (plus extensibility). Again I prefer to specify the
> >> location of my tests myself (although perhaps nose includes a way of
> >> doing this?).
> >>
> >
> > $ nosetests /path/of/the/tests/directory
> >
> >
>
> Sure - but we have many directories of tests. If we have to hardwire
> them all then we would get no advantage over the system we currently use
> (hardwiring the directories with our own test discovery).
>
> Michael
> http://www.manning.com/foord
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>



-- 
"Government does not solve problems; it subsidizes them."
Ronald Reagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20071119/7d79ca2e/attachment.html


More information about the wingide-users mailing list