On 3 Ott, 14:37, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Paul Rubin a écrit :
>
> > brad <[EMAIL PROTECTED]> writes:
>
> >>Does anyone else feel that unittesting is too much work? Not in
> >>general, just the official unittest module for small to medium sized
> >>projects?
>
> > Yeah, unittest is sort of a Java-ism.  You might try the newer doctest
> > module instead.
>
> Or py.test or nose, which are both more complete than doctest and more
> pythonics than the unittest module.

Very interesting, thank you.
This is the first time I heard about py.test so I took a look at what
it is:
http://codespeak.net/py/dist/test.html
http://ianbicking.org/docs/pytest-presentation/pytest-slides.html

At a first look it seems very comfortable to me but I noticed that all
usage examples shown uses nothing but the assert statement:

def test_answer():
    assert 42 == 43

What's the equivalent of unittest's "assertRaises"?
In certain situations it is also useful to test wether an exception
(along its type) is raised or not.
Does py.test support such thing?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to