[IPython-dev] Dropping our parametric tests system
takowl at gmail.com
Fri Aug 30 21:32:29 EDT 2013
On 30 August 2013 17:40, Matt Davis <jiffyclub at gmail.com> wrote:
> I'm not at all familiar with IPython's tests so this may be of no value
> whatever to you, but I find pytest's parametrization features pretty simple
> and easy to use: http://pytest.org/latest/parametrize.html. Something
> like that may allow you to keep the benefits of parametrized tests (less
> code duplication) without the pain of your custom setup.
I think part of the issue is that we don't use the term 'parametric tests'
properly. The logical meaning is "a test which accepts parameters, and can
be run multiple times with different parameters". That's simple to
implement, and both py.test and nose have ways of doing that. py.test's API
is interesting, so thanks for pointing that out.
In IPython's case, a parametric test means "a test which is a generator,
and we count each time it yields as a separate result". The only benefit of
this is psychological: you can quickly increase the number of tests by
writing tests with yields sprinkled in, without any other changes to the
test function, and without testing any more code.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev